WindowsError: [Error 123] when selecting Bazaar, Explorer, System Log

Bug #1021253 reported by André Bachmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
New
Undecided
Unassigned

Bug Description

Bazaar 2.5.1-1 on Win7 x64. This happens when a user profile has a redirected "My Documents" folder as a result of a group policy. After selecting Bazaar, Explorer, System Log in Bazaar Explorer an error is thrown:

=========================================================================================
Thu 2012-07-05 09:12:05 +0200
0.070 bazaar version: 2.5.1
0.071 bzr arguments: [u'qviewer', u'"\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log"']
0.073 looking for plugins in C:/Users/user1/AppData/Roaming/bazaar/2.0/plugins
0.074 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.131 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.292 None

0.295 Traceback (most recent call last):
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\cat.py", line 304, in load
  File "bzrlib\osutils.pyo", line 2245, in file_kind
  File "bzrlib\osutils.pyo", line 2238, in file_stat
WindowsError: [Error 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: u'"\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log"'

0.296 No Apport available to Bazaar
17.794 return code 0
=========================================================================================

Maybe related with another python problem with Windows UNC paths from bug #821354.

Related branches

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 1021253] [NEW] WindowsError: [Error 123] when selecting Bazaar, Explorer, System Log

André Bachmann пишет:
> Public bug reported:
>
> Bazaar 2.5.1-1 on Win7 x64. This happens when a user profile has a
> redirected "My Documents" folder as a result of a group policy. After
> selecting Bazaar, Explorer, System Log in Bazaar Explorer an error is
> thrown:

Error 123 means:

123 The filename, directory name, or volume label syntax is incorrect.
ERROR_INVALID_NAME

I suppose German error message said something like that.

What is the correct filename then? Do you have python installed on that
machine? Can you try to open that file with the proper name from python?
Does this file actually exist? Does it have some content? I wonder if
bzr can write to that file but unable to read from it?

If this is not possible to do from Python, then I fear you have no
option but explicitly specify the filename for log file with environment
variable BZR_LOG.

>
> =========================================================================================
> Thu 2012-07-05 09:12:05 +0200
> 0.070 bazaar version: 2.5.1
> 0.071 bzr arguments: [u'qviewer', u'"\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log"']
> 0.073 looking for plugins in C:/Users/user1/AppData/Roaming/bazaar/2.0/plugins
> 0.074 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
> 0.131 encoding stdout as osutils.get_user_encoding() 'cp1252'
> 0.292 None
>
> 0.295 Traceback (most recent call last):
> File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\cat.py", line 304, in load
> File "bzrlib\osutils.pyo", line 2245, in file_kind
> File "bzrlib\osutils.pyo", line 2238, in file_stat
> WindowsError: [Error 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: u'"\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log"'
>
> 0.296 No Apport available to Bazaar
> 17.794 return code 0
> =========================================================================================
>
> Maybe related with another python problem with Windows UNC paths from
> bug #821354.
>
> ** Affects: qbzr
> Importance: Undecided
> Status: New
>

--
All the dude wanted was his rug back

Changed in qbzr:
status: New → Incomplete
Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

The file really exists and is in \\server\RedirectedFolders\user1\My Documents\.bzr.log. The user has full read and write permissions.

=============================================================================
C:\Python27>python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os.path
>>> pfad = os.path.exists("\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log")
>>> print pfad
True
>>>
=============================================================================

So the file can be seen by Python. Another try:

=============================================================================
C:\Python27>python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os.path
>>> f=file("\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log")
>>> f.read
<built-in method read of file object at 0x0000000001D1D390>
>>> g=open("\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log")
>>> g.readline
<built-in method readline of file object at 0x0000000001D1D420>
>>> for line in g:
... print line
...

this is a debug log for diagnosing/reporting problems in bzr

you can delete or truncate this file, or include sections in

bug reports to https://bugs.launchpad.net/bzr/+filebug

Tue 2012-06-05 13:46:49 +0200
=============================================================================
(I cut out the remaining lines)

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 1021253] Re: WindowsError: [Error 123] when selecting Bazaar, Explorer, System Log

André Bachmann пишет:
> The file really exists and is in \\server\RedirectedFolders\user1\My
> Documents\.bzr.log. The user has full read and write permissions.

Thank you for testing. The real problem according to your traceback
earlier seems to be related to this call

os.lstat(your_path)

Can you check it? Also, can you check

os.stat(your_path)

as well?

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

Here you go:

C:\Python27>python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> r=os.lstat("\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log")
>>> print r
nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=1728851L, st_atime=1337669863L, st_mtime=1341473908L, st_ctime=1337669863L)
>>> s=os.stat("\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log")
>>> print s
nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=1728851L, st_atime=1337669863L, st_mtime=1341473908L, st_ctime=1337669863L)
>>>

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 1021253] [NEW] WindowsError: [Error 123] when selecting Bazaar, Explorer, System Log

André Bachmann пишет:
> Public bug reported:
>
> Bazaar 2.5.1-1 on Win7 x64. This happens when a user profile has a
> redirected "My Documents" folder as a result of a group policy. After
> selecting Bazaar, Explorer, System Log in Bazaar Explorer an error is
> thrown:
>
> =========================================================================================
> Thu 2012-07-05 09:12:05 +0200
> 0.070 bazaar version: 2.5.1
> 0.071 bzr arguments: [u'qviewer', u'"\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log"']

> WindowsError: [Error 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch:
u'"\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log"'

Sorry André, I was totally blind. Everything was before my eyes, but I
was unable to see it.

The answer is really very simple: double quotes around the path.
If you repeat all your tests with path
u'"\\\\server\\RedirectedFolders\\user1\\My Documents\\.bzr.log"'
(note double quotes u'"..."') you should get the same error.

That should be known and still not fixed bug in explorer itself.

affects: qbzr → bzr-explorer
Changed in bzr-explorer:
status: Incomplete → New
Revision history for this message
Alexander Belchenko (bialix) wrote :

bzr-explorer shouldn't double quote the path.

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

Other bug subscribers

Remote bug watches

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