Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--ugoira-conv + instagram video = unexpected error #382

Closed
f2d opened this issue Aug 14, 2019 · 1 comment
Closed

--ugoira-conv + instagram video = unexpected error #382

f2d opened this issue Aug 14, 2019 · 1 comment

Comments

@f2d
Copy link

f2d commented Aug 14, 2019

I was using the same batch files for everything, both *.bat with command and list.txt with links, because automation is there to reduce manual effort after all. So --ugoira-conv was left intact when I added a link from a source other than Pixiv. I guess that Instagram videos are not the only ones affected, but did not check.

Log:

[gallery-dl][debug] Version 1.10.1
...
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /p/BycZLgXHb4P/ HTTP/1.1" 200 15279
[instagram][error] An unexpected error occurred: KeyError - 'extension'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[instagram][debug] 
Traceback (most recent call last):
  File "d:\programs\!_prog_lang\python\3\lib\site-packages\gallery_dl\job.py", line 48, in run
    self.dispatch(msg)
  File "d:\programs\!_prog_lang\python\3\lib\site-packages\gallery_dl\job.py", line 92, in dispatch
    self.handle_url(url, kwds)
  File "d:\programs\!_prog_lang\python\3\lib\site-packages\gallery_dl\job.py", line 202, in handle_url
    pp.prepare(pathfmt)
  File "d:\programs\!_prog_lang\python\3\lib\site-packages\gallery_dl\postprocessor\ugoira.py", line 55, in prepare
    if pathfmt.keywords["extension"] != "zip":
KeyError: 'extension'

I used {extension} in both extractor.pixiv.filename and extractor.instagram.filename formats without any problems, but ugoira module seems to be out of context with Instagram extractor.

It worked as should after I removed --ugoira-conv from command line.

@mikf
Copy link
Owner

mikf commented Aug 14, 2019

Fixed with 2325135.

Videos downloaded with youtube-dl didn't have any filename extension entry in their metadata dict, and checking it directly like here caused an ecxeption.

You could also use a configuration file to restrict ugoira conversions and so on to the relevant extractor modules, so files from Instagram etc. never go through the ugoira check, but you do you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants