Open Martmists-GH opened 7 years ago
Since this got the cant-reproduce
label, here is the full json file, and then environment it is in is as follows:
Issue template clearly states you should provide verbose log.
give me 18 hours and a way to log everything and I'll add one
This can print more information:
diff --git a/youtube_dl/postprocessor/common.py b/youtube_dl/postprocessor/common.py
index 599dd1df2..3e603610b 100644
--- a/youtube_dl/postprocessor/common.py
+++ b/youtube_dl/postprocessor/common.py
@@ -58,8 +58,8 @@ class PostProcessor(object):
def try_utime(self, path, atime, mtime, errnote='Cannot update utime of file'):
try:
os.utime(encodeFilename(path), (atime, mtime))
- except Exception:
- self._downloader.report_warning(errnote)
+ except Exception as e:
+ self._downloader.report_warning(errnote + ': ' + str(e))
def _configuration_args(self, default=[]):
return cli_configuration_args(self._downloader.params, 'postprocessor_args', default)
Here's the most verbose I could get it to be link
Well, I guess just remove the try-except block makes debugging easier. Could you change youtube_dl/postprocessor/common.py and try again?
diff --git a/youtube_dl/postprocessor/common.py b/youtube_dl/postprocessor/common.py
index 599dd1df2..6a6fc3be9 100644
--- a/youtube_dl/postprocessor/common.py
+++ b/youtube_dl/postprocessor/common.py
@@ -56,10 +56,7 @@ class PostProcessor(object):
return [], information # by default, keep file and do nothing
def try_utime(self, path, atime, mtime, errnote='Cannot update utime of file'):
- try:
- os.utime(encodeFilename(path), (atime, mtime))
- except Exception:
- self._downloader.report_warning(errnote)
+ os.utime(encodeFilename(path), (atime, mtime))
def _configuration_args(self, default=[]):
return cli_configuration_args(self._downloader.params, 'postprocessor_args', default)
how would I do that? I don't think my editor can access anything in /data
Seems you're using termux? The termux shell can access its own files.
Editing using nano or vim is a pain though, I have tried to use them but it never seems to work properly.
vim works just fine on my phone. If there's really a problem in vim, Termux can access files in the internal storage. (usually /sdcard)
How do I get youtube_dl to install on /sdcard?
Did some testing, only seems to happen on both my mobile devices. Will investigate.
PC does not seem to raise utime warnings, however it does produce files with no length in the metadata.
What is the purpose of your issue?
Last night I let my phone download a list of songs in a JSON file, formatted as
Today when I woke up, it was done, but a lot of songs had no duration. The code I used is as follows:
It downloads most songs just fine, with only a few failing due to copyright restrictions and similar. However, a lot of them seem to say
WARNING: Cannot update utime of file
. It seems to me that exactly those files have a duration of zero, and from all 7035 files downloaded this has affected about 3000.Any idea why this has happened?