Comments (7)
This looks like a problem with your terminal. Does your terminal allow you to list a file with that special character?
from b2_command_line_tool.
With terminal are you referring to the the terminal being able to print a special character? Because based on the warning shown in the trace, that does not seem to be supported, however if you look at the first line it already breaks down earlier. So I don't think it is related to the terminal.
I found another example and got a better trace:
'ordinal not in range(128)') 'ascii' codec can't encode character '\xe9' in position 54: ordinal not in range(128)
backblaze-download_1 | ERROR:b2sdk.sync.action:an exception occurred in a sync action
backblaze-download_1 | Traceback (most recent call last):
backblaze-download_1 | File "b2sdk/sync/action.py", line 48, in run
backblaze-download_1 | File "b2sdk/sync/action.py", line 252, in do_action
backblaze-download_1 | File "b2sdk/sync/action.py", line 239, in _ensure_directory_existence
backblaze-download_1 | File "os.py", line 225, in makedirs
backblaze-download_1 | UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 54: ordinal not in range(128)
_ensure_directory_existence
seems to be a big clue.
from b2_command_line_tool.
Did some further research and I found that the folder (in my previous example) that was uploaded to B2 contains:
U+0065 | e | LATIN SMALL LETTER E
U+0301 | ́ | COMBINING ACUTE ACCENT
from b2_command_line_tool.
B2 cli can handle it if your terminal can - but it's set to 'ascii' which doesn't handle much
from b2_command_line_tool.
or maybe it's your operating system that is not capable of writing those down - can you please try to create a file by yourself on that filesystem with the unicode char in the name and list it to make sure it works?
from b2_command_line_tool.
So I was able to solve this by forcing my docker container to use UTF-8:
Dockerfile:
FROM ubuntu:22.04
# Set the locale to an UTF-8 one (instead of the default ASCII?)
RUN apt-get update && apt-get -y install locales && locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
COPY b2-linux /backblaze/b2-linux
RUN chmod +x /backblaze/b2-linux
ENTRYPOINT ["/backblaze/b2-linux"]
from b2_command_line_tool.
Would it make sense to document this behavior somewhere in the README.md for example? Specifically stating that the terminal (or even OS locale settings) may influence which files/folders can be downloaded/uploaded?
from b2_command_line_tool.
Related Issues (20)
- Install from source documentation section should be updated to PDM
- Prevent writing b2 file information to stdout when using download-file HOT 2
- [Question or Feature Request] Excluding Symbolic Links HOT 2
- Official Docker Image ? HOT 3
- delete_file_version needs bypassGovernance option HOT 1
- Can't upload FIFOs with upload-file HOT 6
- UnicodeEncodeError: 'ascii' codec can't encode character '\u2022' in position 1325: ordinal not in range(128) HOT 1
- [Question] Explain how sync between buckets work; slow overall speed HOT 8
- b2sdk.exception.InvalidAuthToken: Invalid authorization token. Server said: (bad_auth_token) HOT 2
- Error when resuming upload HOT 2
- switch to stable pypy version after new pypy is released HOT 2
- b2 ls --json destroys output structure with informational message HOT 1
- `Using https://api.backblazeb2.com` output to stderr causing problems for automation that only expects errors and warnings on stderr
- pip install breaks with setuptools 69.0.0 HOT 3
- b2 should respect the spec's default fallback for `XDG_CONFIG_HOME` HOT 4
- Feature request: Support transparent compression HOT 1
- error: the following arguments are required: command HOT 5
- Issue with b2 sync :: KeyError: 'content-length' HOT 11
- Package `b2` for Alpine Linux HOT 5
- Linux.Xor.DDoS false-positive from chkrootkit due PyInstaller use
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from b2_command_line_tool.