scrapy OSError: could not get source code

 

 

 

 

https://stackoverflow.com/questions/61478001/scrapy-pyinstaller-oserror-could-not-get-source-code-twisted-internet-defer

 

 

 File "/usr/local/python39/lib/python3.9/site-packages/scrapy/utils/defer.py", line 55, in mustbe_deferred
    result = f(*args, **kw)
  File "/usr/local/python39/lib/python3.9/site-packages/scrapy/core/spidermw.py", line 52, in _process_spider_input
    return scrape_func(response, request, spider)
  File "/usr/local/python39/lib/python3.9/site-packages/scrapy/core/scraper.py", line 149, in call_spider
    warn_on_generator_with_return_value(spider, callback)
  File "/usr/local/python39/lib/python3.9/site-packages/scrapy/utils/misc.py", line 246, in warn_on_generator_with_return_value
    if is_generator_with_return_value(callable):
  File "/usr/local/python39/lib/python3.9/site-packages/scrapy/utils/misc.py", line 229, in is_generator_with_return_value
    code = re.sub(r"^[\t ]+", "", inspect.getsource(callable))
  File "/usr/local/python39/lib/python3.9/inspect.py", line 1024, in getsource
    lines, lnum = getsourcelines(object)
  File "/usr/local/python39/lib/python3.9/inspect.py", line 1006, in getsourcelines
    lines, lnum = findsource(object)
  File "/usr/local/python39/lib/python3.9/inspect.py", line 835, in findsource
    raise OSError('could not get source code')
OSError: could not get source code

 

posted @ 2024-05-23 17:15  AngDH  阅读(54)  评论(0编辑  收藏  举报