Saigesp / json-translate

Translate json files with DeepL or AWS
GNU Lesser General Public License v2.1
45 stars 18 forks source link

AttributeError: 'str' object has no attribute '_accessor' #28

Closed antonkarliner closed 1 year ago

antonkarliner commented 1 year ago

I tried both on MacOS and on VPS running Ubuntu 22.04, I get the same result:

json_translate deepl data/recipes_aeropress.json fr Traceback (most recent call last): File "/usr/local/bin/json_translate", line 8, in sys.exit(main()) File "/usr/local/lib/python3.10/dist-packages/json_translate/commands.py", line 36, in main data_to_translate = get_data_to_translate( File "/usr/local/lib/python3.10/dist-packages/json_translate/files.py", line 134, in get_data_to_translate with Path.open(input_file, "r", encoding=encoding) as file: File "/usr/lib/python3.10/pathlib.py", line 1119, in open return self._accessor.open(self, mode, buffering, encoding, errors, AttributeError: 'str' object has no attribute '_accessor'

Saigesp commented 1 year ago

Hi @antonkarliner, thanks for reporting the bug.

It should be fixed with release v0.4.2. Please install the new version and reopen the issue if the bug persists.