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

"write-metadata" not working for deviantart #252

Closed
ReneRanzinger opened this issue May 9, 2019 · 5 comments
Closed

"write-metadata" not working for deviantart #252

ReneRanzinger opened this issue May 9, 2019 · 5 comments
Labels

Comments

@ReneRanzinger
Copy link

ReneRanzinger commented May 9, 2019

Using the following command:

gallery-dl.exe -u xxx -p xxx --write-metadata --verbose https://www.deviantart.com/cryptid-creations

This error happens:

[gallery-dl][debug] Version 1.8.3
[gallery-dl][debug] Python 3.7.3 - Windows-7-6.1.7601-SP1
[gallery-dl][debug] requests 2.21.0 - urllib3 1.24.3
[gallery-dl][debug] Starting DownloadJob for 'https://www.deviantart.com/cryptid-creations'
[gallery-dl][debug] updating default urllib3 ciphers
[deviantart][debug] Using DeviantartGalleryExtractor for 'https://www.deviantart.com/cryptid-creations'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.deviantart.com:443
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/user/profile/cryptid-creations HTTP/1.1" 200 3060
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/all?username=cryptid-creations&offset=0&limit=24&mature_content=true HTTP/1.1" 200 None
[deviantart][debug] Active postprocessor modules: [<gallery_dl.postprocessor.metadata.MetadataPP object at 0x031D0650>]
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/425FED0A-3860-06FA-1B94-ECCA3008A3EF?mature_content=true HTTP/1.1" 200 1246
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): s3.amazonaws.com:443
[urllib3.connectionpool][debug] https://s3.amazonaws.com:443 "GET /origin-orig.deviantart.net/ef50/f/2019/128/9/3/daily_paint_2360__webcam_by_cryptid_creations-dd6gyft.png?X-Amz-Content-Sha256=UNSIGNED-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HcSHxrX2lmAcaMm5cPi79jD2pzlQ%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQEFXKLNB5Y27WGZY%2F20190509%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190509T034046Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Signature=dbe2fe6b9453a655e61db3bee19fc9a7f1bd3639bcb4173a2040e9e99ee555a3 HTTP/1.1" 416 None
[deviantart][error] An unexpected error occurred: TypeError - Object of type datetime is not JSON serializable. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[deviantart][debug] 
Traceback (most recent call last):
  File "gallery_dl\job.py", line 55, in run
  File "gallery_dl\job.py", line 99, in dispatch
  File "gallery_dl\job.py", line 230, in handle_url
  File "gallery_dl\postprocessor\metadata.py", line 40, in run
  File "gallery_dl\postprocessor\metadata.py", line 69, in _write_json
  File "json\__init__.py", line 179, in dump
  File "json\encoder.py", line 431, in _iterencode
  File "json\encoder.py", line 405, in _iterencode_dict
  File "json\encoder.py", line 438, in _iterencode
  File "json\encoder.py", line 179, in default
TypeError: Object of type datetime is not JSON serializable
@iamleot
Copy link
Contributor

iamleot commented May 9, 2019 via email

@mikf mikf added the bug label May 9, 2019
mikf added a commit that referenced this issue May 9, 2019
Simplified universal serialization support in json.dump() can be achieved
by passing 'default=str', which was already the case in DataJob.run()
for -j/--dump-json, but not for the 'metadata' post-processor.

This commit introduces util.dump_json() that (more or less) unifies the
JSON output procedure of both --write-metadata and --dump-json.

(#251, #252)
@ReneRanzinger
Copy link
Author

ReneRanzinger commented May 9, 2019 via email

@mikf
Copy link
Owner

mikf commented May 9, 2019

Do you know when you plan to make the next release version?

The next "regular" release would be Friday next week, but I can do one this weekend as well.

As a side note: -u and -p have no effect for DeviantArt. You need to use OAuth if you want to be "logged in", but that is only neccessary if you want to access "private/hidden" content.

@ReneRanzinger
Copy link
Author

ReneRanzinger commented May 9, 2019 via email

@mikf mikf closed this as completed May 17, 2019
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

3 participants