Skip to content

[tiktok][error] An unexpected error occurred: JSONDecodeError - Expecting value: line 1 column 1 (char 0) #7368

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

Open
ricedpengu opened this issue Apr 15, 2025 · 1 comment

Comments

@ricedpengu
Copy link

~ gallery-dl https://www.tiktok.com/@emiru --verbose
<some/many stuffs downloads fine>
...
[tiktok][error] An unexpected error occurred: JSONDecodeError - Expecting value: line 1 column 1 (char 0). Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[tiktok][debug] 
Traceback (most recent call last):
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/job.py", line 152, in run
    for msg in extractor:
               ^^^^^^^^^
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/extractor/tiktok.py", line 32, in items
    data = self._extract_rehydration_data(tiktok_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/extractor/tiktok.py", line 111, in _extract_rehydration_data
    return util.json_loads(data)["__DEFAULT_SCOPE__"]
           ^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2krmq3iv5nibcvn4rw7nrnrciqprdkh-python3-3.12.9/lib/python3.12/json/decoder.py", line 338, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2krmq3iv5nibcvn4rw7nrnrciqprdkh-python3-3.12.9/lib/python3.12/json/decoder.py", line 356, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[tiktok][debug] Using TiktokPostExtractor for 'https://www.tiktok.com/@emiru/video/7056886628287089967'
[tiktok][warning] 7056886628287089967: Failed to retrieve rehydration data (1/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][warning] 7056886628287089967: Failed to retrieve rehydration data (2/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][warning] 7056886628287089967: Failed to retrieve rehydration data (3/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][warning] 7056886628287089967: Failed to retrieve rehydration data (4/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][error] An unexpected error occurred: JSONDecodeError - Expecting value: line 1 column 1 (char 0). Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[tiktok][debug] 
Traceback (most recent call last):
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/job.py", line 152, in run
    for msg in extractor:
               ^^^^^^^^^
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/extractor/tiktok.py", line 32, in items
    data = self._extract_rehydration_data(tiktok_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/extractor/tiktok.py", line 111, in _extract_rehydration_data
    return util.json_loads(data)["__DEFAULT_SCOPE__"]
           ^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2krmq3iv5nibcvn4rw7nrnrciqprdkh-python3-3.12.9/lib/python3.12/json/decoder.py", line 338, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2krmq3iv5nibcvn4rw7nrnrciqprdkh-python3-3.12.9/lib/python3.12/json/decoder.py", line 356, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[tiktok][debug] Using TiktokPostExtractor for 'https://www.tiktok.com/@emiru/video/7056886250753609007'
[tiktok][warning] 7056886250753609007: Failed to retrieve rehydration data (1/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][warning] 7056886250753609007: Failed to retrieve rehydration data (2/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][warning] 7056886250753609007: Failed to retrieve rehydration data (3/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][warning] 7056886250753609007: Failed to retrieve rehydration data (4/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][error] An unexpected error occurred: JSONDecodeError - Expecting value: line 1 column 1 (char 0). Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[tiktok][debug] 
Traceback (most recent call last):
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/job.py", line 152, in run
    for msg in extractor:
               ^^^^^^^^^
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/extractor/tiktok.py", line 32, in items
    data = self._extract_rehydration_data(tiktok_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/2s70yn0kzmylmr9v6l39kqmk8hvslmdq-gallery-dl-1.29.3/lib/python3.12/site-packages/gallery_dl/extractor/tiktok.py", line 111, in _extract_rehydration_data
    return util.json_loads(data)["__DEFAULT_SCOPE__"]
           ^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2krmq3iv5nibcvn4rw7nrnrciqprdkh-python3-3.12.9/lib/python3.12/json/decoder.py", line 338, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2krmq3iv5nibcvn4rw7nrnrciqprdkh-python3-3.12.9/lib/python3.12/json/decoder.py", line 356, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[tiktok][debug] Using TiktokPostExtractor for 'https://www.tiktok.com/@emiru/video/7056550041481383215'
[tiktok][warning] 7056550041481383215: Failed to retrieve rehydration data (1/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][warning] 7056550041481383215: Failed to retrieve rehydration data (2/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[tiktok][warning] 7056550041481383215: Failed to retrieve rehydration data (3/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
^C
KeyboardInterrupt

gallery-dl version

gallery-dl -v
[gallery-dl][debug] Version 1.29.3
[gallery-dl][debug] Python 3.12.9 - Linux-6.13.9-xanmod1-x86_64-with-glibc2.40
[gallery-dl][debug] requests 2.32.3 - urllib3 2.3.0
[gallery-dl][debug] Configuration Files ['${HOME}/.config/gallery-dl/config.json']

ytdl (yt-dlp) version

~ yt-dlp --version
2025.03.31
@CasualYT31
Copy link
Contributor

Looks like you made too many requests too frequently and TikTok started blocking you, it should only be a temporary measure though so you should be able to download again after a certain duration of time.

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