xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 4 years ago

Closed 4 years ago

Last modified 8 months ago

#1747 closed defect (fixed)

Xpra info failing with traceback

Reported by: J. Max Mena Owned by: J. Max Mena
Priority: major Milestone: 2.3
Component: server Version: trunk
Keywords: Cc:


Sorry, I have another "feature broken with traceback" ticket. As usual, the server is a Fedora 26 trunk r18035 (freshly updated).

When running xpra info I get this traceback:

Exception in thread parse:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 804, in __bootstrap_inner
  File "/usr/lib64/python2.7/threading.py", line 757, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/xpra/net/protocol.py", line 738, in _read_parse_thread_loop
    self._internal_error("error in network packet reading/parsing", e, exc_info=True)
  File "/usr/lib64/python2.7/site-packages/xpra/net/protocol.py", line 676, in _internal_error
    log.error("Error: %s", message, exc_info=ei)
  File "/usr/lib64/python2.7/site-packages/xpra/log.py", line 379, in error
    self.log(logging.ERROR, msg, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/xpra/log.py", line 366, in log
    global_logging_handler(self.logger.log, level, msg, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/xpra/log.py", line 111, in standard_logging
    log(level, msg, *args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1231, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1286, in _log
  File "/usr/lib64/python2.7/logging/__init__.py", line 1296, in handle
  File "/usr/lib64/python2.7/logging/__init__.py", line 1335, in callHandlers
    if record.levelno >= hdlr.level:
  File "/usr/lib64/python2.7/codecs.py", line 401, in __getattr__
    return getattr(self.stream, name)
AttributeError: 'file' object has no attribute 'level'

Change History (3)

comment:1 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

This was caused by r18030 which was trying to make unicode play nice with python2 and python3 on the win32 console:

  • r18036 fixes this for most platforms (..)
  • r18037 makes us ignore the platform's "preferred encoding", which is "cp1252" on my win7 VM and was causing unicode to come out garbled with python3...

What this should allow us to do is use unicode characters anywhere strings are allowed, ie:

python2 /usr/bin/xpra start --session-name="Schrödinger"

Then both python2 and python3 versions should be able to print the session name without errors:

python2 /usr/bin/xpra id
python3 /usr/bin/xpra id

This should also fix "xpra info" errors when some of the window metadata contains unicode. (ie: running applications with a non-english locale)

Some entertaining read on the subject:

comment:2 Changed 4 years ago by J. Max Mena

Resolution: fixed
Status: newclosed

Noted, closing.

comment:3 Changed 8 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1747

Note: See TracTickets for help on using tickets.