question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After python3.8 update I receive error

See original GitHub issue

Hi, I recently installed the latest python3.8 update (3.8.13) via pkg (FreeBSD).

Now I receive the following error with tvnamer:

#tvnamer .

Traceback (most recent call last):
  File "/usr/local/bin/tvnamer", line 33, in <module>
    sys.exit(load_entry_point('tvnamer==3.0.4', 'console_scripts', 'tvnamer')())
  File "/usr/local/bin/tvnamer", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/local/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.8/site-packages/tvnamer/main.py", line 18, in <module>
    import tvdb_api
  File "/usr/local/lib/python3.8/site-packages/tvdb_api.py", line 34, in <module>
    from requests_cache.backends.base import _to_bytes, _DEFAULT_HEADERS
ImportError: cannot import name '_to_bytes' from 'requests_cache.backends.base' (/usr/local/lib/python3.8/site-packages/requests_cache/backends/base.py)

Unfortunately I am a Python illiterate. Is this a problem with tvnamer?

Many thanks

Georg

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
georghubercommented, May 8, 2022

Many thanks; I’ll contact the maintainer from FreeBSD ports, because their latest tvdb_api version was from a year ago.

0reactions
georghubercommented, Oct 4, 2022

I think we are getting ahead, but not quite there yet. The maintainer of the tvdb_api port included your fix but now I am getting this error:

tvnamer star.trek.strange.new.world.s01e10.mkv
####################
# Starting tvnamer
# Found 1 episode
####################
# Processing file: star.trek.strange.new.world.s01e10.mkv
# Detected series: star trek strange new world (season: 1, episode: 10)
Traceback (most recent call last):
  File "/usr/local/bin/tvnamer", line 33, in <module>
    sys.exit(load_entry_point('tvnamer==3.0.4', 'console_scripts', 'tvnamer')())
  File "/usr/local/lib/python3.9/site-packages/tvnamer/main.py", line 474, in main
    tvnamer(paths = sorted(args))
  File "/usr/local/lib/python3.9/site-packages/tvnamer/main.py", line 370, in tvnamer
    processFile(tvdb_instance, episode)
  File "/usr/local/lib/python3.9/site-packages/tvnamer/main.py", line 175, in processFile
    episode.populateFromTvdb(tvdb_instance, force_name=Config['force_name'], series_id=Config['series_id'])
  File "/usr/local/lib/python3.9/site-packages/tvnamer/utils.py", line 641, in populateFromTvdb
    show = tvdb_instance[force_name or self.seriesname]
  File "/usr/local/lib/python3.9/site-packages/tvdb_api.py", line 1152, in __getitem__
    sid = self._nameToSid(key)
  File "/usr/local/lib/python3.9/site-packages/tvdb_api.py", line 1136, in _nameToSid
    selected_series = self._getSeries(name)
  File "/usr/local/lib/python3.9/site-packages/tvdb_api.py", line 935, in _getSeries
    all_series = self.search(series)
  File "/usr/local/lib/python3.9/site-packages/tvdb_api.py", line 914, in search
    series_resp = self._getetsrc(self.config['url_getSeries'] % (series))
  File "/usr/local/lib/python3.9/site-packages/tvdb_api.py", line 874, in _getetsrc
    src = self._loadUrl(url, language=language)
  File "/usr/local/lib/python3.9/site-packages/tvdb_api.py", line 811, in _loadUrl
    self.authorize()
  File "/usr/local/lib/python3.9/site-packages/tvdb_api.py", line 859, in authorize
    r = self.session.post(
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests_cache/session.py", line 115, in request
    return super().request(method, url, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests_cache/session.py", line 127, in send
    cache_key = self.cache.create_key(request, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/tvdb_api.py", line 547, in create_key
    if self._ignored_parameters:
AttributeError: 'SQLiteCache' object has no attribute '_ignored_parameters'

I am so sorry causing so much trouble, but I just can’t give up now that we are about there 😃

Georg

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to upgrade Python 3.8.10 to 3.10 - SOLVED
When we reached 2nd command in Step 3: Add Python 3.8 & Python 3.10 to update-alternatives, we see this error. $ sudo update-alternatives...
Read more >
Update from python 3.7 to 3.8 causes problems with pylint and ...
8 folder were quite empty, I moved all the site-packages (> 1GB) from the remnant/residual python3.7 to the new python3.8 folder. With this,...
Read more >
18.04 - Error with sudo apt-get update; and Termnial won't open
I installed Python3.8.0 (from Ubuntu channels, not PPA). I did update-alternatives --config python3 and in a moment of weakness, I also did ...
Read more >
How to upgrade to Python 3.8 on Ubuntu 18.04 LTS - isw blog
Step 2: Install the Python 3.8 package using apt-get. install Python 3.8 by using the below command : sudo apt-get install python3.8
Read more >
Your python3 install is corrupted. Please fix the '/usr/bin ...
When trying to do “do-release-upgrade” from current Ubuntu 18.04 to new 19.04 I am getting error "Your python3 install is corrupted.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found