500 server error when using ASIN
lovek323 opened this issue · 2 comments
lovek323 commented
I'm using the docker image available here: ghcr.io/djdembeck/bragibooks:v0.3.7
I've just updated to the new version (v0.3.7) that you released, and I get this error when trying to use asin
in my output template:
transmission-bragi-books-1 | Internal Server Error: /import/match
transmission-bragi-books-1 | Traceback (most recent call last):
transmission-bragi-books-1 | File "/usr/local/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
transmission-bragi-books-1 | response = get_response(request)
transmission-bragi-books-1 | ^^^^^^^^^^^^^^^^^^^^^
transmission-bragi-books-1 | File "/usr/local/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
transmission-bragi-books-1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
transmission-bragi-books-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
transmission-bragi-books-1 | File "/usr/local/lib/python3.11/site-packages/django/views/generic/base.py", line 103, in view
transmission-bragi-books-1 | return self.dispatch(request, *args, **kwargs)
transmission-bragi-books-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
transmission-bragi-books-1 | File "/usr/local/lib/python3.11/site-packages/django/views/generic/base.py", line 142, in dispatch
transmission-bragi-books-1 | return handler(request, *args, **kwargs)
transmission-bragi-books-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
transmission-bragi-books-1 | File "/home/app/web/importer/views.py", line 138, in post
transmission-bragi-books-1 | merge_object.run_m4b_merge()
transmission-bragi-books-1 | File "/home/app/web/utils/merge.py", line 52, in run_m4b_merge
transmission-bragi-books-1 | self.m4b.run_merge()
transmission-bragi-books-1 | File "/usr/local/lib/python3.11/site-packages/m4b_merge/m4b_helper.py", line 263, in run_merge
transmission-bragi-books-1 | self.prepare_command_args()
transmission-bragi-books-1 | File "/usr/local/lib/python3.11/site-packages/m4b_merge/m4b_helper.py", line 108, in prepare_command_args
transmission-bragi-books-1 | self.prepare_output_path()
transmission-bragi-books-1 | File "/usr/local/lib/python3.11/site-packages/m4b_merge/m4b_helper.py", line 189, in prepare_output_path
transmission-bragi-books-1 | self.replace_tag('asin', self.metadata.asin)
transmission-bragi-books-1 | ^^^^^^^^^^^^^^^^^^
transmission-bragi-books-1 | AttributeError: 'dict' object has no attribute 'asin'
My template is set to this: author/title (year)_asin/title - subtitle
Not sure if I need to update to a new version of m4b_merge
or anything like that?
Edit: Adding some more context.
lovek323 commented
If I change the code int he m4b_helper.py
file on line 189 to this:
# First we need to replace the terms with actual data
self.replace_tag('asin', self.metadata['asin'])
it works.
lovek323 commented
I'm closing this. Looks like I just needed to pull a later image.