moz667 / homodaba

Aplicación django para gestionar/clasificar los videos de bpk
GNU General Public License v3.0
3 stars 3 forks source link

Error on csv_to_imdb #17

Closed bpk667 closed 3 years ago

bpk667 commented 3 years ago

It seems the csv_to_imdb module fails due to non-imdb movies.

bbbroot@7ffb93a73dc7:/opt/app# python homodaba/manage.py csv_to_imdb --csv-file import/Listado_Pelis.csv -v 2
WARN:  - No coincide el titulo csv:'Las Hurdes' db:'Land Without Bread'.
WARN:  - No coincide el titulo csv:'The Killers' db:'Murderers'.
WARN:  - No coincide el titulo csv:'Les mistons' db:'The Mischief Makers'.
WARN:  - No coincide el titulo csv:'La notte' db:'The Night'.
WARN:  - No coincide el titulo csv:'Chimes at Midnight' db:'Falstaff (Chimes at Midnight)'.
ERRR: ERROR en 'Na putu'
ERRR: Error no esperado
<class 'AttributeError'>
Traceback (most recent call last):
  File "homodaba/manage.py", line 22, in <module>
    main()
  File "homodaba/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/opt/app/homodaba/data/management/commands/csv_to_imdb.py", line 231, in handle
    cur_movie = self.get_csv_imdb_json_data(csv_row, force_check_imdb_id)
  File "/opt/app/homodaba/data/management/commands/csv_to_imdb.py", line 88, in get_csv_imdb_json_data
    not_an_imdb_movie=strtobool(cd['not_an_imdb_movie']) if 'not_an_imdb_movie' and cd['not_an_imdb_movie'] else False
  File "/usr/local/lib/python3.8/distutils/util.py", line 313, in strtobool
    val = val.lower()
AttributeError: 'int' object has no attribute 'lower'
bpk667 commented 3 years ago

Fixed at 593cc2bf380818be5e43bb057c63de4dd16732c7