推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
bestehen
V2EX  ›  Python

Python 报错 如何解决?

  •  
  •   bestehen · Aug 16, 2018 · 2344 views
    This topic created in 2878 days ago, the information mentioned may be changed or developed.
    5 ('Connection aborted.', BadStatusLine("''",))
    266 Traceback (most recent call last):
    267 File "/home/shenjianlin/log/my_project/run.py", line 58, in <module>
    268 run().get_spider()
    269 File "/home/shenjianlin/log/my_project/run.py", line 54, in get_spider
    270 qimingpian().get_id_and_front_url()
    271 File "/home/shenjianlin/log/my_project/qimingpian_person/qimingpian_person.py", line 181, in get_id_and_front_url
    272 self.get_agency_content(row_column_list[i], row_column_list[i+1], auth, proxies,user_index)
    273 File "/home/shenjianlin/log/my_project/qimingpian_person/qimingpian_person.py", line 408, in get_agency_content
    274 if len(etree.HTML(org_content).xpath('//div[@class="info"]/a/span[@class="name"]/text()')) == 1:
    275 UnboundLocalError: local variable 'org_content' referenced before assignment
    3 replies    2018-08-22 00:40:53 +08:00
    laoli123
        1
    laoli123  
       Aug 16, 2018
    laoli123
        2
    laoli123  
       Aug 16, 2018
    建议楼主从基础看起 基础很重要
    bestehen
        3
    bestehen  
    OP
       Aug 22, 2018
    @xiaobai987 一边去
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3173 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 02:40 · PVG 10:40 · LAX 19:40 · JFK 22:40
    ♥ Do have faith in what you're doing.