View Single Post
Old 12-13-2021, 02:58 PM   #265
xvicarious
Junior Member
xvicarious began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2020
Device: KindlePW5
Quote:
Originally Posted by albell View Post
Hi,
your plugin is simply awesome! Thank you so much

However I'm trying to change the .csv file for Genre mappping, I'd like to use the French version posted above, but I get always an error warning:
Here are the details:

calibre, version 5.15.0
Traceback (most recent call last):
File "calibre_plugins.library_codes.ui", line 3047, in import_csv_file
_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.library_codes.ui", line 3004, in import_csv_mappings
File "calibre_plugins.library_codes.ui", line 3060, in import_csv_file
File "calibre\gui2\__init__.py", line 395, in error_dialog
File "calibre\gui2\dialogs\message_box.py", line 103, in __init__
TypeError: QLabel.setText(): argument 1 has unexpected type 'Error'


Am I doing something wrong?
Thank you!
A
It is opening the CSV as a binary file. I don't *think* it should be doing that. Odd error to make, unless something changed between versions of Python. It probably had something to do with UTF. On `ui.py#L3045` the `'rb'` should probably be changed to `'r'`. I'll test that out.
xvicarious is offline   Reply With Quote