IgnoredAmbience / yahoo-group-archiver

Scrapes and archives a Yahoo groups email archives, photo galleries and file contents using the non-public API
MIT License
93 stars 46 forks source link

TypeError: unbound method __init__() must be called with RecordingHTTPConnection instance as first argument (got VerifiedHTTPSConnection instance instead) #103

Closed brettneese closed 4 years ago

brettneese commented 4 years ago

Attempting to archive this group as a non-owner, I get a bunch of errors which ultimately boil down to:

2019-11-07 17:45:21.301 CST INFO requests.packages.urllib3.connectionpool Starting new HTTPS connection (4): groups.yahoo.com
Traceback (most recent call last):
  File "./yahoo.py", line 718, in <module>
    archive_db(yga)
  File "./yahoo.py", line 310, in archive_db
    db_json = yga.database()
  File "/Users/brettneese/Development/git/github.com/IgnoredAmbience/yahoo-group-archiver/yahoogroupsapi.py", line 156, in get_json
    r = self.s.get(uri, params=opts, verify=VERIFY_HTTPS, allow_redirects=False, timeout=15)
  File "/Users/brettneese/Library/Python/2.7/lib/python/site-packages/requests/sessions.py", line 395, in get
    return self.request('GET', url, **kwargs)
  File "/Users/brettneese/Library/Python/2.7/lib/python/site-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/brettneese/Library/Python/2.7/lib/python/site-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/Users/brettneese/Library/Python/2.7/lib/python/site-packages/requests/adapters.py", line 334, in send
    timeout=timeout
  File "/Users/brettneese/Library/Python/2.7/lib/python/site-packages/requests/packages/urllib3/connectionpool.py", line 475, in urlopen
    conn = self._get_conn(timeout=pool_timeout)
  File "/Users/brettneese/Library/Python/2.7/lib/python/site-packages/requests/packages/urllib3/connectionpool.py", line 217, in _get_conn
    return conn or self._new_conn()
  File "/Users/brettneese/Library/Python/2.7/lib/python/site-packages/requests/packages/urllib3/connectionpool.py", line 654, in _new_conn
    **extra_params)
  File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1243, in __init__
    source_address)
TypeError: unbound method __init__() must be called with RecordingHTTPConnection instance as first argument (got VerifiedHTTPSConnection instance instead)

Looks like my Python version is 2.7.16 on OSX, and I double checked that my cookies were in order.

Lotus907efi commented 4 years ago

I was getting this same error with python2.7 on Ubuntu. When I tried python3.4 instead the error went away but unfortunately I got a different error.

IgnoredAmbience commented 4 years ago

Unfortunately, I'm unable to reproduce this, and unsure what the cause of the issue could be.

brettneese commented 4 years ago

@IgnoredAmbience no worries! I will try a few different python versions to see if I can get it to work

unchaoss commented 4 years ago

FYI moving from 2.7 to 3.4 on Linux Mint 17.3 fixed the issue for me and I did not hit any further errors.

brettneese commented 4 years ago

Can also confirm that moving to a 3.x version solved the problem and I was able to archive the group I was trying to! Closing the issue, anyone who needs it can find it via search. Thanks all!