Error raised when trying to read from watch file if you still have the old watch file.
See original GitHub issueWhen I tried to open my watch list in the most recent version, the following error was thrown:
Kevin@CHF117 MINGW32 /d/git/anime-downloader (master)
$ anime watch -l
anime: anime-downloader 2.6.0
Traceback (most recent call last):
File "C:\Users\Kevin\AppData\Local\Programs\Python\Python36-32\Scripts\anime-s cript.py", line 11, in <module>
load_entry_point('anime-downloader', 'console_scripts', 'anime')()
File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag es\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag es\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag es\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag es\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag es\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "d:\git\anime-downloader\anime_downloader\cli.py", line 190, in watch
list_animes(watcher, quality, download_dir)
File "d:\git\anime-downloader\anime_downloader\cli.py", line 208, in list_anim es
watcher.list()
File "d:\git\anime-downloader\anime_downloader\watch.py", line 34, in list
animes = self._read_from_watch_file()
File "d:\git\anime-downloader\anime_downloader\watch.py", line 114, in _read_f rom_watch_file
data = json.load(watch_file)
File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\json\__init __.py", line 296, in load
return loads(fp.read(),
File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\encodings\c p1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 43: chara cter maps to <undefined>
I figured it was because the old file was a pickle file and it was trying to decode it as a json file, so I deleted the old file (AppData > Roaming > anime downloader
on Windows) and voila, it works.
Is there a way we can identify and delete the old watch file automatically so that people don’t have to do this on their own?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Swift file reading permission error on macOS sandbox
I 'm trying to read the contents of a file on the filesystem in a macOS Swift app (Xcode 9 / Swift 4)....
Read more >Catching FileNotFoundError? Watch Out! - Top Bug Net
In Python, FileNotFoundError is an exception that is raised when a requested file does not exist. Many people assume that when their programs ......
Read more >VSC unable to watch for file changes in this large workspace ...
1. After loading a folder, it shows warning. Visual Studio Code is unable to watch for file changes in this large workspace. After...
Read more >20 Apple Watch Errors / Issues / Problems and Their Fixes
Facing problems or issues with Apple Watch on watchOS 7? Here are the 20 most common Apple Watch issues/errors/problems and how to fix...
Read more >FileSystemWatcher Class (System.IO) - Microsoft Learn
Listens to the file system change notifications and raises events when a directory, or file in a directory, changes.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Enderlein Even though you have push access to the repository, it’s better to open a PR, unless it’s a very minor change. I’ll do the same too, because another pair of eyes is always better.
Haha. Okay then.