stack-overflow-import icon indicating copy to clipboard operation
stack-overflow-import copied to clipboard

No longer works

Open vadim0x60 opened this issue 3 years ago • 0 comments

In 2021 this package always fails to import things with the following error:

  File "/home/vadim0x60/.pyenv/versions/3.9.9/lib/python3.9/site-packages/stackoverflow/__init__.py", line 34, in find_spec
    code, author, url = cls.find_working_code(spec.name)
  File "/home/vadim0x60/.pyenv/versions/3.9.9/lib/python3.9/site-packages/stackoverflow/__init__.py", line 24, in find_working_code
    result = cls.fetch_code(url)
  File "/home/vadim0x60/.pyenv/versions/3.9.9/lib/python3.9/site-packages/stackoverflow/__init__.py", line 85, in fetch_code
    return cls.find_code_in_html(q.text)
  File "/home/vadim0x60/.pyenv/versions/3.9.9/lib/python3.9/site-packages/stackoverflow/__init__.py", line 94, in find_code_in_html
    answer.votes = int(answer.find(itemprop="upvoteCount")["data-value"])
TypeError: 'NoneType' object is not subscriptable

Tragic to see an essential part of my workflow completely fail me.

vadim0x60 avatar Apr 12 '22 16:04 vadim0x60