Reputation: 63
My building process for the static site is as follows:
public
folderpublic
folder and rename to gzipped
.gzipped
folder I run following code: find . -type f -exec gzip "{}" \; -exec mv "{}.gz" "{}" \;
When I include a € character in my .md
file like following, then I get below error. Apparently it does not like special characters written like so - €1000
in my .md
file (I guess the dash -
is the culprit):
tags:
- tag1
- €1000
- tag2
- tag3
Here the error:
Step #4: Caught non-retryable exception while listing file://./gzipped: 'ascii' codec can't encode characters in position 10-12: ordinal not in range(128)
Step #4: CommandException: Caught non-retryable exception - aborting rsync
.
How to fix my tags listing
with an € in front of a dash?
Upvotes: 1
Views: 367
Reputation: 2593
When you say "push to my repo", I assume you're using the gsutil rsync
command, mostly due to the error message you're getting, which comes from this line of code:
Glancing at the code there, I'm not sure why gsutil would be trying to use the ASCII codec. My two best guesses are:
gsutil version
to check.find
command that you're running on a Linux or macOS system -- if so, from your shell, you can check what Python thinks the default encoding is with:$ python -c "import locale; print(locale.getdefaultlocale())"
This is emitted in my terminal, which uses UTF-8 as the default encoding:
('en_US', 'UTF-8')
Finally, if that isn't helpful, you'll probably want to get a bit more info than just the summary text shown in your error message - you could try adding in some extra print
statements near the line I linked above, in your local gsutil installation (in the <path-to-gsutil>/gslib/commands/rsync.py
file). Ideally, you'd want to view the whole stack trace to see where the error came from, so adding something like print(traceback.format_exc())
in the body of that except:
block would be useful.
Upvotes: 1