TypeError: BaseException.with_traceback() takes exactly one argument (0 given)

Open Beginner friendly
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start in pyigdl/igdl.py around line 75, where the exception handler calls with_traceback(), and compare that call with Python's exception API. Reproduce the Instagram downloader example or an equivalent connection failure, then confirm the original network error is reported without a secondary TypeError.

Written by the indexing model from the issue text.

Description

code from pypi

from pyigdl import IGDownloader

data = IGDownloader("https://www.instagram.com/reel/Co3tkGLL8nl/")
print(data[0]["download_link"])

result

gaierror                                  Traceback (most recent call last)
[/usr/local/lib/python3.11/dist-packages/urllib3/connection.py](https://localhost:8080/#) in _new_conn(self)
    197         try:
--> 198             sock = connection.create_connection(
    199                 (self._dns_host, self.port),

18 frames
gaierror: [Errno -2] Name or service not known

The above exception was the direct cause of the following exception:

NameResolutionError                       Traceback (most recent call last)
NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7a5a9e86bdd0>: Failed to resolve 'v3.saveig.app' ([Errno -2] Name or service not known)

The above exception was the direct cause of the following exception:

MaxRetryError                             Traceback (most recent call last)
MaxRetryError: HTTPSConnectionPool(host='v3.saveig.app', port=443): Max retries exceeded with url: /api/ajaxSearch (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7a5a9e86bdd0>: Failed to resolve 'v3.saveig.app' ([Errno -2] Name or service not known)"))

During handling of the above exception, another exception occurred:

ConnectionError                           Traceback (most recent call last)
ConnectionError: HTTPSConnectionPool(host='v3.saveig.app', port=443): Max retries exceeded with url: /api/ajaxSearch (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7a5a9e86bdd0>: Failed to resolve 'v3.saveig.app' ([Errno -2] Name or service not known)"))

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
[/usr/local/lib/python3.11/dist-packages/pyigdl/igdl.py](https://localhost:8080/#) in IGDownloader(url)
     73         return _sendPostRequest(serverUrl, payloadData, headers)
     74     except Exception as e:
---> 75         print(e.with_traceback())

TypeError: BaseException.with_traceback() takes exactly one argument (0 given)

best regards

Dominant language
Python
Stars
6
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CrypticGuy/pyigdl

All issues in CrypticGuy/pyigdl

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.