[Python-de] win32net-resonse won' t properly appear on screen (Unicode-problem)?

Julian Schaefer-Jasinski julschae at t-online.de
Thu Oct 25 19:41:04 EDT 2001


>Kann es sein, daß der String UTF-8 encodiert ist?
>Ciao, Jürgen

Sorry,

da muss ich passen... Habe den String nicht vorher instanziert.
Hier der selbe Fehler mit dem leicht modifizierten Code in
win23/Demos/win32netdemo.py

--------->
import win32net

server="\\\Chaos"
resume = 0
nmembers = 0
while 1:
  data, total, resume = win32net.NetLocalGroupEnum(server, 1, resume)
  for group in data:
    print "Found group %(name)s : %(comment)s " % group
    if not resume:
      break

<------------

Traceback (most recent call last):
  File "C:\Python21\Pythonwin\pywin\framework\scriptutils.py", line 301, in
RunScript
    exec codeObject in __main__.__dict__
  File "C:\win32_experiments\test_03.py", line 9, in ?
    print "Found group %(name)s : %(comment)s " % group
UnicodeError: ASCII encoding error: ordinal not in range(128)

_______________________________________________
J. Schaefer-Jasinski                Frankfurt, Germany




More information about the Python-de mailing list