GithubHelp home page GithubHelp logo

Comments (7)

ppolewicz avatar ppolewicz commented on July 4, 2024

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.

Rolf-Smit avatar Rolf-Smit commented on July 4, 2024

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.

Rolf-Smit avatar Rolf-Smit commented on July 4, 2024

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.

ppolewicz avatar ppolewicz commented on July 4, 2024

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.

ppolewicz avatar ppolewicz commented on July 4, 2024

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.

Rolf-Smit avatar Rolf-Smit commented on July 4, 2024

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.

Rolf-Smit avatar Rolf-Smit commented on July 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.