Comments (5)
Thanks for reporting. The error is raised by youtube_dl
on file youtube_dl/utils.py
.
try:
upload_date = datetime.datetime(*timetuple[:6]).strftime('%Y%m%d')
except ValueError:
pass
It's raised on this line:
upload_date = datetime.datetime(*timetuple[:6]).strftime('%Y%m%d')
The script only catches ValueError
but a TypeError
is raised so the error isn't handled.
I replaced
try:
upload_date = datetime.datetime(*timetuple[:6]).strftime('%Y%m%d')
except ValueError:
pass
by
try:
upload_date = datetime.datetime(*timetuple[:6]).strftime('%Y%m%d')
except ValueError:
pass
except TypeError:
pass
To fix the error run these commands:
$ rm ~/Documents/site-packages3/youtube_dl/utils.py
$ curl https://raw.githubusercontent.com/ColdGrub1384/youtube-dl_LibTerm/master/youtube_dl/utils.py -o site-packages3/youtube_dl/utils.py
from libterm.
Thank you very much for the fix. It works!
So does this behavior of Libterm is right?
For example in Pythonista it doesn’t give this error (even without the fix).
And even in Libterm if i execute script (without the fix) in python’s console multiple times it works. But if i quit console with “stop” button and re execute script it will give error, otherwise quiting python with os._exit(0) it works.
from libterm.
The behavior of LibTerm is different than Pythonista. And both are also different than on a computer.
Pythonista is an IDE, without command line (except the REPL). What Pythonista does is that the REPL is always running and runs scripts on top of it. LibTerm runs the interpreter and when its stoped the thread running it is stopped. So I think the problem should be when "Stop" is pressed the thread is just stopped but no cleanup functions is called. I will include this youtube_dl
version in the next update.
from libterm.
Very well! Do you know a way to call a cleanup function after executing a script from file with python?
It could be a fix for other modules. Or you should include it in stop button and after a script file finish to run. Because for example after youtube-dl’s bug, sometimes python crash on startup and cleanup with os._exit() doesn’t work anymore.
The only way is to kill the app.
from libterm.
I’m not sure Apple will appreciate youtube-dl on AppStore. :D Be carefull we don’t want Libterm to be removed from AppStore.
from libterm.
Related Issues (20)
- LibTerm
- Miau
- Dropbox support
- Update? HOT 1
- Python2 on iPad HOT 1
- Operation not permitted in ensurepip
- Lib
- Make python be able to be run as commands HOT 4
- is the project alive? // questions about python and package utility HOT 2
- State of LLVM tool chain // potential for extension
- (Suggestion) Add support for color HOT 1
- When a linked folder has 9000+ files, LibTerm can’t work as usual.
- L HOT 1
- Add the possibility to modify the PATH
- support of pipe
- no pip HOT 1
- find -exec doesn't work.
- The unset command for shell variables is missing.
- Enable GitHub Discussion. HOT 2
- Student
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libterm.