WindowsError due to Unicode path issue

Bug #1101344 reported by Brian Curtin
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-4-2
Fix Released
Undecided
Unassigned
Trunk
Fix Released
Critical
Unassigned

Bug Description

Reported by a user on another bug:

This bug has to be re-opened. I have just installed the latest Ubuntu One Windows Client version 4.0, and the bug is there.

--------------------------- Log file -------------------------------------------------------------------------------------------------------------------

2013-01-18 20:19:19,671 - ubuntuone.SyncDaemon - ERROR - [Failure instance: Traceback: <type 'exceptions.WindowsError'>: [Error 5] : 'C:\\Users\\\xd0\x90\xd0\xb4\xd0\xbc\xd0\xb8\xd0\xbd'
twisted\internet\defer.pyc:362:callback
twisted\internet\defer.pyc:458:_startRunCallbacks
twisted\internet\defer.pyc:545:_runCallbacks
twisted\internet\defer.pyc:1095:gotResult
--- <exception caught here> ---
twisted\internet\defer.pyc:1039:_inlineCallbacks
ubuntuone-syncdaemon:236:async_main
ubuntuone\syncdaemon\main.pyc:115:__init__
ubuntuone\syncdaemon\tritcask.pyc:630:__init__
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:157:makedirs
]
Traceback (most recent call last):
  File "twisted\internet\defer.pyc", line 545, in _runCallbacks
  File "ubuntuone-syncdaemon", line 90, in check_death
  File "twisted\python\failure.pyc", line 346, in trap
Failure: [Failure instance: Traceback: <type 'exceptions.WindowsError'>: [Error 5] : 'C:\\Users\\\xd0\x90\xd0\xb4\xd0\xbc\xd0\xb8\xd0\xbd'
twisted\internet\defer.pyc:362:callback
twisted\internet\defer.pyc:458:_startRunCallbacks
twisted\internet\defer.pyc:545:_runCallbacks
twisted\internet\defer.pyc:1095:gotResult
--- <exception caught here> ---
twisted\internet\defer.pyc:1039:_inlineCallbacks
ubuntuone-syncdaemon:236:async_main
ubuntuone\syncdaemon\main.pyc:115:__init__
ubuntuone\syncdaemon\tritcask.pyc:630:__init__
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:150:makedirs
os.pyc:157:makedirs
]
------------------------------------------------------------------------------------------------------------------------------------------------------------

Related branches

Revision history for this message
Brian Curtin (brian.curtin) wrote :

@Beowulf - can you please provide your entire log file?

Julien Funk (jaboing)
Changed in ubuntuone-client:
status: New → Confirmed
importance: Undecided → Critical
tags: added: u1-by-dev u1-on-production u1-windows
Revision history for this message
Loïc Minier (lool) wrote :

Here's a log that I get; I too have a non-ascii username (Loïc) and U1 is unable to register, to start, and then keeps creating processes unless I kill everything an relaunch it as admin.

The problem is that it tries creating C:\Users\Loïc\AppData\Local\xdg\ubuntuone\syncdaemon\tritcask instead of C:\Loïc\...

Revision history for this message
Loïc Minier (lool) wrote :

Oddly, I end up with just tritcask data in C:\Users\Loïc; other U1 files are properly under C:\Users\Loïc. I thought tritcask was just the first os.makedirs().

Revision history for this message
Loïc Minier (lool) wrote :

Ah there's an os.makedirs() in tritcask.py at odds with the other ubuntuone.platform.make_dir() calls.

Is there an easy way for me to update tritcask.py on my local install?

Revision history for this message
Loïc Minier (lool) wrote :

After patching tritcask.py to use the ubuntuone platform API in r1386 of lp:~lool/ubuntuone-client/tritcask-use-platform-api I get a little further:
2013-02-10 22:02:24,351 - ubuntuone.SyncDaemon.VM - DEBUG - creating shares directory: 'C:\\Users\\Lo\xc3\xafc\\AppData\\Local\\xdg\\ubuntuone\\shares'
2013-02-10 22:02:24,354 - ubuntuone.SyncDaemon - ERROR - [Failure instance: Traceback: <class 'pywintypes.error'>: (5, 'SetFileSecurity', 'Acc\xe8s refus\xe9.')
twisted\internet\defer.pyc:362:callback
twisted\internet\defer.pyc:458:_startRunCallbacks
twisted\internet\defer.pyc:545:_runCallbacks
twisted\internet\defer.pyc:1095:gotResult
--- <exception caught here> ---
twisted\internet\defer.pyc:1039:_inlineCallbacks
ubuntuone-syncdaemon:236:async_main
ubuntuone\syncdaemon\main.pyc:116:__init__
ubuntuone\syncdaemon\volume_manager.pyc:438:__init__
ubuntuone\platform\os_helper\windows.pyc:398:inner
ubuntuone\platform\os_helper\windows.pyc:552:set_dir_readwrite
ubuntuone\platform\os_helper\windows.pyc:314:inner
ubuntuone\platform\os_helper\windows.pyc:544:_set_dir_readwrite
ubuntuone\platform\os_helper\windows.pyc:314:inner
ubuntuone\platform\os_helper\windows.pyc:473:_set_file_attributes
]
Traceback (most recent call last):
  File "twisted\internet\defer.pyc", line 545, in _runCallbacks
  File "ubuntuone-syncdaemon", line 90, in check_death
  File "twisted\python\failure.pyc", line 346, in trap
Failure: [Failure instance: Traceback: <class 'pywintypes.error'>: (5, 'SetFileSecurity', 'Acc\xe8s refus\xe9.')
twisted\internet\defer.pyc:362:callback
twisted\internet\defer.pyc:458:_startRunCallbacks
twisted\internet\defer.pyc:545:_runCallbacks
twisted\internet\defer.pyc:1095:gotResult
--- <exception caught here> ---
twisted\internet\defer.pyc:1039:_inlineCallbacks
ubuntuone-syncdaemon:236:async_main
ubuntuone\syncdaemon\main.pyc:116:__init__
ubuntuone\syncdaemon\volume_manager.pyc:438:__init__
ubuntuone\platform\os_helper\windows.pyc:398:inner
ubuntuone\platform\os_helper\windows.pyc:552:set_dir_readwrite
ubuntuone\platform\os_helper\windows.pyc:314:inner
ubuntuone\platform\os_helper\windows.pyc:544:_set_dir_readwrite
ubuntuone\platform\os_helper\windows.pyc:314:inner
ubuntuone\platform\os_helper\windows.pyc:473:_set_file_attributes
]

Revision history for this message
Loïc Minier (lool) wrote :
Revision history for this message
Loïc Minier (lool) wrote :

Ah! The SetFileSecurity error is because I ran Ubuntu One as admin once and hadn't removed C:\Users\Loïc\Ubuntu One between tests (I had only removed the AppData\Local\xdg and \ubuntuone dirs).

Now that I've cleared all files and put back the original windows.py in place, everything works as expected: U1 starts and syncs files just fine, without being launched as admin.

Revision history for this message
Loïc Minier (lool) wrote :

So I was over enthuastic with the first path as Ubuntu One only appeared to work properly on the first run; there were probably errors that I hadn't noticed in the large log from the initial sync. Subsequent runs wouldn't work at all anyway.

I've pushed a bunch of other revs to deal with other os.* calls in tritcask.py, and now U1 works for me, I can quit and start again.

Revision history for this message
stimanov (stimanov) wrote :

Looks like this my bug report - https://bugs.launchpad.net/ubuntuone-client/+bug/1121255 - of the same nature.

I'm just curious why sync folder in Windows is always located in the user profile folder and can not be placed in some other place.

Changed in ubuntuone-client:
status: Confirmed → Fix Committed
Revision history for this message
stimanov (stimanov) wrote :

I was wrong. Published bugfix didn't solve my problem (post #10).

Revision history for this message
Loïc Minier (lool) wrote :

Did you try starting U1 with admin privileges, and now you're trying to start without these? I had similar symptis at some point, and that requires fixing the permissions of various folders, or removing them.

Revision history for this message
stimanov (stimanov) wrote :

No. My account which consists of unicode characters is not admin one. At the same time U1 works well on the same computer with another non-admin account which consists of English characters only.

Revision history for this message
Beowulf (s-highlander) wrote :

 tpThis bug emerged after upgrading U1 Windows Client from 2.0.0 to 4.0.0. So I don't think this is relates to permissions, because the previous version worked fine with the same permissions.

Revision history for this message
Loïc Minier (lool) wrote :

stimanov, did you actually deploy the latest changes manually? I've tried updating to the latest published version, and it doesn't seem to include a fix for this bug yet (I'm getting the bug with when I wasn't with the fixes applied locally).

Revision history for this message
dobey (dobey) wrote :

This bug is not fixed in the latest release of Ubuntu One for Windows. It is only fixed in our trunk source repository at the moment.

Revision history for this message
stimanov (stimanov) wrote :

Ok. Now it's clear.

Revision history for this message
stimanov (stimanov) wrote :

Just one question (sorry, i'm newbie on this forum) - how can i get the info that mentioned bug is resolved in the latest release?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.