Closed axelboc closed 3 years ago
I'm on Windows (obviously the culprit), I've got both Python 3.8 and 3.7 installed. I created a Python 3.7 environment with pipenv
as you explained in the CONTRIBUTING
guide. I then run pipenv shell
and brain_brew recipes\source_to_anki.yaml
.
Not testing on Windows is a pretty gigantic omission on my part. It somehow never crossed my mind...
Off the top of my head, I would guess that the issue is that Python on Windows uses the system locale encoding rather than UTF-8. It probably can be easily solved by explicitly specifying the encoding.
Presumably, adding , encoding='utf-8'
in csv_file.py
(l. 32):
def read_file(self):
self._data = []
with open(self.file_location, mode='r', newline='', encoding='utf-8') as csv_file:
csv_reader = csv.DictReader(csv_file)
self.column_headers = list_of_str_to_lowercase(csv_reader.fieldnames)
if you're feeling adventurous and willing to meddle with the internal contents of a virtualenv, should solve this issue. (The encoding should probably also be specified in some other places, to prevent other bugs.)
Does not ring a bell! I have run it on Windows, so this is surprising 🤔 I can have a look tomorrow morning (if @aplaice hasn't solved it already 😂👌)
Apologies for the delay, will have a look at this on Saturday :+1: Should be a simple fix
No rush, I'm swamped as well at the moment. Thanks, @aplaice for looking into it! ❤️
Fixed. Thanks @aplaice :clap:
I'm trying to run the
source_to_anki.yml
recipe in UG, but I'm running into this error:Here a few lines from the stack trace:
Does it ring a bell?