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

Error when searching for Nichijou on MAL #532

Closed
Skaytacium opened this issue Dec 6, 2020 · 3 comments
Closed

Error when searching for Nichijou on MAL #532

Skaytacium opened this issue Dec 6, 2020 · 3 comments

Comments

@Skaytacium
Copy link

When searching for "Nichijou" or "nichijou" or "nichi" it raises a KeyError: 'unknown'

[mal] (anime) watching >> add Nichijou libmal: Searching for Nichijou... Traceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python39\Scripts\trackma-script.py", line 33, in <module> sys.exit(load_entry_point('Trackma==0.8.4', 'console_scripts', 'trackma')()) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\trackma-0.8.4-py3.9.egg\trackma\ui\cli.py", line 1079, in main main_cmd.cmdloop() File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\cmd.py", line 138, in cmdloop stop = self.onecmd(line) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\trackma-0.8.4-py3.9.egg\trackma\ui\cli.py", line 780, in onecmd return self.execute(cmd, args, line) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\trackma-0.8.4-py3.9.egg\trackma\ui\cli.py", line 797, in execute return func(args) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\trackma-0.8.4-py3.9.egg\trackma\ui\cli.py", line 409, in do_add entries = self.engine.search(args[0]) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\trackma-0.8.4-py3.9.egg\trackma\engine.py", line 482, in search return self.data_handler.search(criteria, method) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\trackma-0.8.4-py3.9.egg\trackma\data.py", line 219, in search results = self.api.search(criteria, method) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\trackma-0.8.4-py3.9.egg\trackma\lib\libmal.py", line 318, in search results.append(self._parse_info(item['node'])) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\trackma-0.8.4-py3.9.egg\trackma\lib\libmal.py", line 365, in _parse_info 'type': self.type_translate[item['media_type']], KeyError: 'unknown'

Version: straight from GitHub. Ran setup.py with python 3.9 and install.
OS: Windows 10 20H2
Other: Using windows terminal and a modified PS, but has the same result when using engine.search()

Other things I tried: using python 3.8.6

Any help would be greatly appreciated.

@Skaytacium
Copy link
Author

Also, when it doesn't have any results (the search function), it returns this and terminates instead of an error/event.

Traceback (most recent call last): File "C:\Python38\Scripts\trackma-script.py", line 33, in <module> sys.exit(load_entry_point('Trackma==0.8.4', 'console_scripts', 'trackma')()) File "C:\Python38\lib\site-packages\trackma-0.8.4-py3.8.egg\trackma\ui\cli.py", line 1079, in main main_cmd.cmdloop() File "C:\Python38\lib\cmd.py", line 138, in cmdloop stop = self.onecmd(line) File "C:\Python38\lib\site-packages\trackma-0.8.4-py3.8.egg\trackma\ui\cli.py", line 780, in onecmd return self.execute(cmd, args, line) File "C:\Python38\lib\site-packages\trackma-0.8.4-py3.8.egg\trackma\ui\cli.py", line 797, in execute return func(args) File "C:\Python38\lib\site-packages\trackma-0.8.4-py3.8.egg\trackma\ui\cli.py", line 409, in do_add entries = self.engine.search(args[0]) File "C:\Python38\lib\site-packages\trackma-0.8.4-py3.8.egg\trackma\engine.py", line 482, in search return self.data_handler.search(criteria, method) File "C:\Python38\lib\site-packages\trackma-0.8.4-py3.8.egg\trackma\data.py", line 219, in search results = self.api.search(criteria, method) File "C:\Python38\lib\site-packages\trackma-0.8.4-py3.8.egg\trackma\lib\libmal.py", line 318, in search results.append(self._parse_info(item['node'])) File "C:\Python38\lib\site-packages\trackma-0.8.4-py3.8.egg\trackma\lib\libmal.py", line 368, in _parse_info 'image': item['main_picture']['large'], KeyError: 'main_picture'

OS Info and others are the same as above

@z411
Copy link
Owner

z411 commented Jan 20, 2021

Fixed by #545

@Skaytacium
Copy link
Author

Great!

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

2 participants