cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to hear from you. What do you use Dropbox for?
Close

Dropbox files & folders

Get in sync with the Dropbox Community. Our members can answer all your questions on Dropbox files and folders. Join a discussion or start your own today.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

UnicodeDecodeError in dropbox status command line with export LC_ALL=C

Explorer | Level 4

Ubuntu + CLI user here.

Having strange issue with command "dropbox status" and LC_ALL variable.

By default, my terminal is in French, and I get no error :

~$ dropbox status ;
À jour

Some context:

~$ echo $LANG
fr_FR.UTF-8
~$ echo $LC_ALL

~$ dropbox version
Dropbox daemon version: 71.4.108
Dropbox command-line interface version: 2019.02.14

When overriding LC_ALL=C to get my terminal in English rather than in French (https://unix.stackexchange.com/a/87748/168003), I get errors (and I reproduce this error when repeating same steps in new terminals).

~$ export LC_ALL=C ;
~$ dropbox status ;
Traceback (most recent call last):
  File "/usr/bin/dropbox", line 1594, in <module>
    ret = main(sys.argv)
  File "/usr/bin/dropbox", line 1583, in main
    result = commands[argv[i]](argv[i+1)
  File "/usr/bin/dropbox", line 743, in newmeth
    return meth(*n, **kw)
  File "/usr/bin/dropbox", line 1215, in status
    lines = dc.get_dropbox_status()['status']
  File "/usr/bin/dropbox", line 714, in __spec_command
    return self.send_command(str(name), kw)
  File "/usr/bin/dropbox", line 672, in send_command
    ok = self.__readline() == "ok"
  File "/usr/bin/dropbox", line 646, in __readline
    toret = self.f.readline().rstrip("\n")
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(12

And when I restore, it outputs in French with no error:

~$ export LC_ALL= ;
~$ dropbox status
À jour

 

(I have just run the "bad file tool finder", and renamed all that where invalid, still same error).

5 Replies 5
Highlighted

Re: UnicodeDecodeError in dropbox status command line with export LC_ALL=C

Dropboxer
Dropboxer
Hey there @el_teedee,
 
Just so I have a better understanding, can you let me know which distribution you are using? Also, if you can check the system requirements and let me know if you are running the essential requirements (or what may be different).
 
Looking forward to hearing from you - Cheers!

Daphne
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Re: UnicodeDecodeError in dropbox status command line with export LC_ALL=C

Explorer | Level 4

Hello,

 

my distribution: Ubuntu 18.04.2 LTS

$ uname -a
Linux intel9700k 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

GLibC version: (fromhttps://www.linuxquestions.org/questions/linux-software-2/how-to-check-glibc-version-263103/)

$ ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

My Linux partition is using ext4 (according to GParted).

 

Other informations that could be usefull:

  1. my Dropbox was first created under a Windows OS, and since, I use it on both Ubuntu, and Windows
  2. some of my folder contains accentuated letters such as "é" in their name
Highlighted

Re: UnicodeDecodeError in dropbox status command line with export LC_ALL=C

Dropboxer
Dropboxer
Hey @el_teedee, thanks for that info!
 
So I’d like to put you in contact with one of our specialists to see if they can shed some more light on this situation. If you would like, I can open a ticket up for you with the email address associated with your Community profile.
 
Otherwise, if you have already submitted a ticket with our team for this query, please feel free to let me know the ticket reference number (eg. #1234567) and I can follow up with the info you provided here.
 
Let me know what works for you - Thanks!

Daphne
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Highlighted

Re: UnicodeDecodeError in dropbox status command line with export LC_ALL=C

New member | Level 2
New member | Level 2

I have the same problem.

For me it build down to dropbox status printing this line:

Syncing 25,582 files • 1 sec

the letter before 1 sec is not ascii.

Same might happen if dropbox has a problem with a file and the filename is non ascii.

Highlighted

Re: UnicodeDecodeError in dropbox status command line with export LC_ALL=C

Super Collaborator | Level 20

Hi @gizmomogwai,

Your problem is something else, definitely. @el_teedee problem is related to result string encoding, not filename. Further, your problem is Dropbox daemon related, the one initially reported here is control script related.

Hope this remove confusion to some extent.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Need more support?