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

[vk] local variable 'cnt' referenced before assignment #1742

Closed
viceroycowboy opened this issue Aug 1, 2021 · 1 comment
Closed

[vk] local variable 'cnt' referenced before assignment #1742

viceroycowboy opened this issue Aug 1, 2021 · 1 comment
Labels

Comments

@viceroycowboy
Copy link

[gallery-dl][debug] Version 1.18.2
[gallery-dl][debug] Python 3.9.4 - Windows-10-10.0.19041-SP0
[gallery-dl][debug] requests 2.26.0 - urllib3 1.26.4
[gallery-dl][debug] Starting DownloadJob for 'https://vk.com/id8934629'
[vk][debug] Using VkPhotosExtractor for 'https://vk.com/id8934629'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): vk.com:443
[urllib3.connectionpool][debug] https://vk.com:443 "GET /id8934629 HTTP/1.1" 200 20987
[vk][debug] Sleeping for 2.999 seconds
[urllib3.connectionpool][debug] https://vk.com:443 "POST /photos8934629 HTTP/1.1" 200 6179
[vk][error] An unexpected error occurred: UnboundLocalError - local variable 'cnt' referenced before assignment. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[vk][debug]
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\gallery_dl\job.py", line 76, in run
for msg in self.extractor:
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\gallery_dl\extractor\vk.py", line 103, in items
if cnt <= 40 or offset == params["offset"]:
UnboundLocalError: local variable 'cnt' referenced before assignment

@mikf
Copy link
Owner

mikf commented Aug 2, 2021

Commit fe970fc fixes the exception, but you still need to be logged in to get any photos from this private/hidden profile. Try using cookies if you have an account that can access it.

@mikf mikf closed this as completed Aug 2, 2021
@mikf mikf added the bug label Aug 2, 2021
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