You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as my limited Python knowledge goes it seems to me that after subsequent restarts of the bot, the cache file is not actually being loaded even though it clearly states it's the right one in the JSON file.
Here's what I get after running it with ./TTMediaBot.sh:
/home/chris/.local/lib/python3.10/site-packages/pydantic/_migration.py:283: UserWarning: `pydantic.error_wrappers:ValidationError` has been moved to `pydantic:ValidationError`.
warnings.warn(f'`{import_path}` has been moved to `{new_location}`.')
Traceback (most recent call last):
File "/home/chris/TTMediaBot/TTMediaBot.py", line 64, in <module>
main()
File "/home/chris/TTMediaBot/TTMediaBot.py", line 45, in main
bot = Bot(config, cache, log)
File "/home/chris/TTMediaBot/bot/__init__.py", line 60, in __init__
self.cache_manager = cache.CacheManager(cache_file_name)
File "/home/chris/TTMediaBot/bot/cache.py", line 42, in __init__
self.data = cache_migrator.migrate(self, self._load())
File "/home/chris/TTMediaBot/bot/cache.py", line 55, in _load
return pickle.load(f)
File "/home/chris/.local/lib/python3.10/site-packages/yt_dlp/utils/networking.py", line 70, in __setitem__
super().__setitem__(key.title(), str(value).strip())
File "/usr/lib/python3.10/collections/__init__.py", line 1109, in __setitem__
self.data[key] = item
AttributeError: 'HTTPHeaderDict' object has no attribute 'data'
Running on a test instance of Ubuntu 22.04 before I upgrade my main server. Any reason why this is happening and can this be fixed?
The text was updated successfully, but these errors were encountered:
ChrisDuffley
changed the title
After Cache File is Modified, the Bot Is Prevented from Running because of It Not Properly Recognized
After Cache File is Modified, the Bot Is Prevented from Running because of It Not Properly Recognized (So It Seems)
Mar 27, 2024
I also have various bots, running on Docker, which sometimes don't start correctly due to this issue. The only solution that has worked to me is to move or remove the cache file. Actually I was unable to figure out what exact change in cache contents causes this, because the issue doesn't happen every time.
Yes, only Youtube, the other services are directly disabled. I think that no matter if we search videos or we play raw URLs, but we don't play URLs very often.
With regard to reproducing the issue, I have seen cache files only with one or two recent videos (only Youtube search, no URLs) causing this, and others, with the same number of videos, not, so...couldn't get the reproduction pattern so far.
As far as my limited Python knowledge goes it seems to me that after subsequent restarts of the bot, the cache file is not actually being loaded even though it clearly states it's the right one in the JSON file.
Here's what I get after running it with ./TTMediaBot.sh:
Running on a test instance of Ubuntu 22.04 before I upgrade my main server. Any reason why this is happening and can this be fixed?
The text was updated successfully, but these errors were encountered: