[python-win32] winshell error

Mike Driscoll mdriscoll at co.marshall.ia.us
Thu Jan 24 17:15:12 CET 2008


Hi,

I have a Python login script that runs various things on login for the
users in our Windows domain. Every once in a while, I'll get a traceback
when I use winshell to try to find the user's desktop. The offending code
is:

userDesktop = winshell.desktop()

And the traceback:

File "\\servername\logon\MCISpy.py", line 256, in ?
    import SoScripts
  File "\\servername\logon\PythonPackages\Utilities\SoScripts.py", line
42, in ?
    userDesktop = winshell.desktop()
  File "\\servername\logon\Python24\lib\site-packages\winshell.py", line
48, in desktop
    return get_path ((shellcon.CSIDL_DESKTOP,
shellcon.CSIDL_COMMON_DESKTOPDIRECTORY)[common])
  File "\\servername\logon\Python24\lib\site-packages\winshell.py", line
44, in get_path
    return shell.SHGetPathFromIDList (shell.SHGetSpecialFolderLocation (0,
folder_id))
com_error: (-2147467259, 'Unspecified error', None, None)


Our login scripts have an error reporting module that emails the
tracebacks to us when they occur. Since this doesn't happen every time the
user logs in, it is difficult to track down. Does anyone know what this is
and how to fix it?

Thanks!

Mike Driscoll
Applications Specialist
MCIS - Technology Center




More information about the python-win32 mailing list