Skip to content

Looks like #19, but no requests around #349

Open
@mcepl

Description

@mcepl

Hi, when running fanficfare with python2.7 from python3 branch of https://github.com/mcepl/FanFicFare/tree/python3 I get this:

matej@mitmanek: test_epub$ ~/.bin/fanficfare -u https://archiveofourown.org/works/14927013/
Traceback (most recent call last):
  File "/home/matej/.bin/fanficfare", line 9, in <module>
    load_entry_point('FanFicFare', 'console_scripts', 'fanficfare')()
  File "/home/matej/repos/FanFicFare/fanficfare/cli.py", line 267, in main
    passed_personalini)
  File "/home/matej/repos/FanFicFare/fanficfare/cli.py", line 373, in do_download
    adapter.getStoryMetadataOnly()
  File "/home/matej/repos/FanFicFare/fanficfare/adapters/base_adapter.py", line 279, in getStoryMetadataOnly
    self.doExtractChapterUrlsAndMetadata(get_cover=get_cover)
  File "/home/matej/repos/FanFicFare/fanficfare/adapters/base_adapter.py", line 363, in doExtractChapterUrlsAndMetadata
    return self.extractChapterUrlsAndMetadata()
  File "/home/matej/repos/FanFicFare/fanficfare/adapters/adapter_archiveofourownorg.py", line 156, in extractChapterUrlsAndMetadata
    data = self._fetchUrl(url)
  File "/home/matej/repos/FanFicFare/fanficfare/configurable.py", line 1249, in _fetchUrl
    referer=referer)[0]
  File "/home/matej/repos/FanFicFare/fanficfare/configurable.py", line 1238, in _fetchUrlOpened
    referer=referer)
  File "/home/matej/repos/FanFicFare/fanficfare/configurable.py", line 1139, in _fetchUrlOpened
    raise(excpt)
AttributeError: 'HTTPMessage' object has no attribute 'getheaders'
matej@mitmanek: test_epub$ 

which in reality (there is a lot of weird exception handling) is

Traceback (most recent call last):
  File "/home/matej/repos/FanFicFare/fanficfare/configurable.py", line 1127, in _fetchUrlOpened
    referer=referer)
  File "/home/matej/repos/FanFicFare/fanficfare/configurable.py", line 1087, in _fetchUrlRawOpened
    opened = self.opener.open(url.replace(' ','%20'),None,float(self.getConfig('connect_timeout',30.0)))
  File "/home/matej/.local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 500, in open
    response = meth(req, response)
  File "/home/matej/.local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1344, in http_response
    self.cookiejar.extract_cookies(response, request)
  File "/usr/lib64/python2.7/cookielib.py", line 1642, in extract_cookies
    for cookie in self.make_cookies(response, request):
  File "/usr/lib64/python2.7/cookielib.py", line 1559, in make_cookies
    rfc2965_hdrs = headers.getheaders("Set-Cookie2")
AttributeError: 'HTTPMessage' object has no attribute 'getheaders'

It looks very much like #19, except FanFicFare doesn't use requests but only the standard library. Any idea, what's going on?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions