Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Crash when tag not found #3

Open
ghost opened this issue Feb 23, 2016 · 1 comment
Open

Crash when tag not found #3

ghost opened this issue Feb 23, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 23, 2016

Better error handling is required when a tag is not found.

Movies $ moviemon .


Indexing all movies inside  .


 58%|█████████████████████████████████████████████████████████████████████████████████████████████████▊                                                                      | 316/543 [01:53<01:46, 2.14B/s]
Traceback (most recent call last):
  File "/usr/local/bin/moviemon", line 9, in <module>
    load_entry_point('moviemon==1.0.11', 'console_scripts', 'moviemon')()
  File "/usr/local/lib/python2.7/dist-packages/moviemon/moviemon.py", line 61, in main
    util(args)
  File "/usr/local/lib/python2.7/dist-packages/moviemon/moviemon.py", line 77, in util
    scan_dir(docopt_args["PATH"], dir_json)
  File "/usr/local/lib/python2.7/dist-packages/moviemon/moviemon.py", line 281, in scan_dir
    data = get_movie_info(name)
  File "/usr/local/lib/python2.7/dist-packages/moviemon/moviemon.py", line 302, in get_movie_info
    return omdb(movie_info['title'], None)
KeyError: 'title'
@iCHAIT
Copy link
Owner

iCHAIT commented Mar 30, 2016

Firstly, sorry for such a delayed response. I realize that this is bug in my code itself, and honestly is a one line fix, but I think the legit way to go about this would be to have tests for the code so that we have a more authentic and stronger way of catching such errors. Currently, I don't have much time, but I'll work on this as soon as I find some time.

Thanks for reporting :)

@iCHAIT iCHAIT mentioned this issue Mar 30, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant