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

в виде кода не может войти по токену #12

Closed
firs-iln opened this issue Sep 6, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@firs-iln
Copy link

firs-iln commented Sep 6, 2022

Опишите проблему
код не может получить доступ к странице, падает из-за несовпадения ip, не совсем понятно как это возможно, учитывая, что получение токена и запуск проекта происходят на одной машине

Как воспроизвести ошибку
запуск через cmd, следую инструкциям

  • Windows 11
  • VK_TOKEN="токен"
    BYPASS_CAPTCHA="1"
    SPOTIFY_MODE="0"
    REVERSE="0"
    STRICT_SEARCH="1"
    ADD_TO_LIBRARY="1"
  • добавление из треклиста
  • vk.com/firs_iln
  • python
  • 3.0

Дополнительная информация
ERROR:root:[5] User authorization failed: access_token was given to another ip address.
Traceback (most recent call last):
File "D:\Загрузки\vk-music-import-0.3\vk-music-import-0.3\vk-music-import.py", line 140, in main
user_info = vk.users.get()[0]
File "C:\Users\firs_\AppData\Local\Programs\Python\Python38-32\lib\site-packages\vk_api\vk_api.py", line 737, in call
return self._vk.method(self.method, kwargs)
File "C:\Users\firs
\AppData\Local\Programs\Python\Python38-32\lib\site-packages\vk_api\vk_api.py", line 697, in method
raise error
vk_api.exceptions.ApiError: [5] User authorization failed: access_token was given to another ip address.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Загрузки\vk-music-import-0.3\vk-music-import-0.3\vk-music-import.py", line 364, in
main()
File "D:\Загрузки\vk-music-import-0.3\vk-music-import-0.3\vk-music-import.py", line 145, in main
user_info = vk.users.get()[0]
File "C:\Users\firs_\AppData\Local\Programs\Python\Python38-32\lib\site-packages\vk_api\vk_api.py", line 737, in call
return self._vk.method(self.method, kwargs)
File "C:\Users\firs
\AppData\Local\Programs\Python\Python38-32\lib\site-packages\vk_api\vk_api.py", line 697, in method
raise error
vk_api.exceptions.ApiError: [5] User authorization failed: access_token was given to another ip address.
Нажмите Enter, чтобы завершить работу программы...

@firs-iln firs-iln added the bug Something isn't working label Sep 6, 2022
@mewforest
Copy link
Owner

mewforest commented Sep 7, 2022

Скорей всего токен был получен на другой IP-адрес. Попробуйте выключить VPN и заменить содержимое config.env на значения по умолчанию.

Кстати, не забудьте проверить, что в самом браузере также не включен VPN/прокси.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants