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

[pixiv] TypeError: expected string or bytes-like object #78

Closed
caoli5288 opened this issue Feb 19, 2018 · 2 comments
Closed

[pixiv] TypeError: expected string or bytes-like object #78

caoli5288 opened this issue Feb 19, 2018 · 2 comments
Labels

Comments

@caoli5288
Copy link

Hi. Stacktrace here.

[gallery-dl][debug] Version 1.2.0
[gallery-dl][debug] Python 3.5.2 - Linux-4.4.0-43-Microsoft-x86_64-with-Ubuntu-16.04-xenial
[gallery-dl][debug] requests 2.18.4 - urllib3 1.22
[gallery-dl][debug] Starting DownloadJob for 'https://www.pixiv.net/member_illust.php?id=7210261'
[pixiv][debug] Using PixivUserExtractor for 'https://www.pixiv.net/member_illust.php?id=7210261'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): public-api.secure.pixiv.net
[urllib3.connectionpool][debug] https://public-api.secure.pixiv.net:443 "GET /v1/users/7210261.json HTTP/1.1" 200 279
[urllib3.connectionpool][debug] https://public-api.secure.pixiv.net:443 "GET /v1/users/7210261/works.json?image_sizes=large HTTP/1.1" 200 3515
./gallery-dl/pixiv/7210261 qianye_qys3/pixiv_7210261_66889255_p00.jpg
./gallery-dl/pixiv/7210261 qianye_qys3/pixiv_7210261_66889255_p01.jpg
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.pixiv.net
[urllib3.connectionpool][debug] https://www.pixiv.net:443 "GET /member_illust.php?mode=medium&illust_id=66806629 HTTP/1.1" 200 16579
[pixiv][error] An unexpected error occurred: TypeError - expected string or bytes-like object. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[pixiv][debug] Traceback
Traceback (most recent call last):
  File "/home/yiwan/.local/lib/python3.5/site-packages/gallery_dl/job.py", line 63, in run
    for msg in self.extractor:
  File "/home/yiwan/.local/lib/python3.5/site-packages/gallery_dl/extractor/pixiv.py", line 43, in items
    url, framelist = self.parse_ugoira(work)
  File "/home/yiwan/.local/lib/python3.5/site-packages/gallery_dl/extractor/pixiv.py", line 90, in parse_ugoira
    r'\1 \2\n', frames
  File "/usr/lib/python3.5/re.py", line 182, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
@mikf mikf closed this as completed in b79f1f2 Feb 19, 2018
@mikf mikf added the bug label Feb 19, 2018
@mikf mikf changed the title TypeError: expected string or bytes-like object [pixiv] TypeError: expected string or bytes-like object Feb 19, 2018
@mikf
Copy link
Owner

mikf commented Feb 19, 2018

As a temporary fix if you don't want to get the latest Git-snapshot, disable ugoira-downloads with
-o ugoira=false or by setting pixiv.ugoira in your config file to false.

@caoli5288
Copy link
Author

Oh what speed of fix. THX

mikf added a commit that referenced this issue Feb 19, 2018
Some animations are not available for mobile devices, so we
pretend to be a desktop browser when requesting the ugoira page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants