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

UnboundLocalError: local variable 'hammer_timeouts' referenced before assignment #38

Closed
qantus opened this issue Dec 16, 2013 · 5 comments

Comments

@qantus
Copy link

qantus commented Dec 16, 2013

Версия из pypi

@lorien
Copy link
Owner

lorien commented Dec 19, 2013

Здравствуйте, приложите пожалуста код скрипта, который позволит повторить ошибку.

@qantus
Copy link
Author

qantus commented Dec 19, 2013

нужно добавить в 423 base.py строку hammer_timeouts = False | None по вашему усмотрению

@max107
Copy link

max107 commented Dec 19, 2013

@lorien ошибка появляется со странной периодичностью, тоесть, даже если составить минимальный код то воспроизвести проблему будет сложно.

Пример кода как используется grab:

# coding=utf-8
from grab import Grab

grab_params = dict(proxy='127.0.0.1:9050', proxy_type='socks5',
                   hammer_mode=True, hammer_timeouts=((2, 5), (10, 15), (20, 30)))
g = Grab()
g.go('http://betcityru.com/bets/bets2.php', post={'line_id[]': 1}, **grab_params)

@lorien lorien closed this as completed in 445a95e Feb 6, 2014
@lorien
Copy link
Owner

lorien commented Feb 6, 2014

Спасибо за багрепорт. Пофиксил.

@max107
Copy link

max107 commented Feb 7, 2014

Спасибо!

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

3 participants