Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Fails on IPFS #52

Open
evm626 opened this issue Jul 1, 2022 · 0 comments
Open

[BUG] Fails on IPFS #52

evm626 opened this issue Jul 1, 2022 · 0 comments

Comments

@evm626
Copy link

evm626 commented Jul 1, 2022

Describe the bug
Requests get call fails on getting an IPFS url.

The collection you were trying to download
evmavericks

Expected behavior
Should download images.

Terminal output (please show the error that the console showed)

Traceback (most recent call last):
  File "/Users/xyz/Documents/Draw/OpenSea-NFT-Stealer/opensea.py", line 163, in <module>
    image = requests.get(image_url)
  File "/Users/xyz/.pyenv/versions/3.10.2/lib/python3.10/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/Users/xyz/.pyenv/versions/3.10.2/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/xyz/.pyenv/versions/3.10.2/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/xyz/.pyenv/versions/3.10.2/lib/python3.10/site-packages/requests/sessions.py", line 695, in send
    adapter = self.get_adapter(url=request.url)
  File "/Users/xyz/.pyenv/versions/3.10.2/lib/python3.10/site-packages/requests/sessions.py", line 792, in get_adapter
    raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for 'ipfs://QmecvpNSiaSSKqvLRVCG3g3r9ifaRh1LgVjzDvDfztVmue'

The fix is simple, the problem is at line 163 of opensea.py, there is a requests get command that precedes the url check for ipfs links. It needs to be moved after the ipfs or fail gracefully.

if not len(image_url) == 0:
       image = requests.get(image_url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant