Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.91k stars 164 forks source link

Windows 7 "SystemError: Negative size passed to PyUnicode_New" #4107

Closed Invisible-Boy closed 6 months ago

Invisible-Boy commented 7 months ago

I installed Xpra 5.0.4 setup.exe in windows 7. But it cannot work. An error happened, "SystemError: Negative size passed to PyUnicode_New."

Where i can find old release setup exe?

Any help would be appreciated.

totaam commented 7 months ago

Please post the full error message. Preferably by running xpra_cmd.exe

Invisible-Boy commented 7 months ago

This is error details.

Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'D:\Xpra\Xpra_cmd.exe'
  isolated = 0
  environment = 0
  user site = 1
  safe_path = 0
  import site = 0
  is in build tree = 0
  stdlib dir = ''
  sys._base_executable = 'D:\\Xpra\\Xpra_cmd.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.platlibdir = 'lib'
  sys.executable = 'D:\\Xpra\\Xpra_cmd.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'D:\\Xpra\\lib\\library.zip',
    'D:\\Xpra\\lib',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
Traceback (most recent call last):
  File "<frozen importlib._bootstrap_external>", line 1441, in _path_importer_cache
KeyError: 'D:\\Xpra\\lib\\library.zip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen zipimport>", line 92, in __init__
KeyError: 'D:\\Xpra\\lib\\library.zip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1138, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1078, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1508, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1477, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1443, in _path_importer_cache
  File "<frozen importlib._bootstrap_external>", line 1419, in _path_hooks
  File "<frozen zipimport>", line 94, in __init__
  File "<frozen zipimport>", line 517, in _read_directory
  File "<frozen importlib._bootstrap_external>", line 108, in _path_join
SystemError: Negative size passed to PyUnicode_New
totaam commented 7 months ago

Please post your full environment using set

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding

This error does not come from xpra. As per this answer to the same error message, it's very likely that something in your environment is causing this problem. Another installation of python, a virtualenv, or something like it.

Invisible-Boy commented 7 months ago

All my environment variavles is below. Please help me.

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Person\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPOSE_CONVERT_WINDOWS_PATHS=true
COMPUTERNAME=Person-PC
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Person
LOCALAPPDATA=C:\Users\Person\AppData\Local
LOGONSERVER=\\Person-PC
NUMBER_OF_PROCESSORS=8
OS=Windows_NT
Path=D:\lua54\install\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;d:\LLVM\bin;D:\CMake\;in;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;D:\Rust\bin;D:\Git\cmd;d:\Bandizip\;D:\RTIDDS\rti_connext_dds-6.1.1\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files (x86)\MSBuild\14.0\Bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=5e03
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files\Intel\Wired Networking\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\Person\AppData\Local\Temp
TMP=C:\Users\Person\AppData\Local\Temp
USERDOMAIN=Person-PC
USERDOMAIN_ROAMINGPROFILE=Person-PC
USERNAME=Person
USERPROFILE=C:\Users\Person
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
windir=C:\Windows
windows_tracing_flags=3
windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
totaam commented 7 months ago

Try running with a cleaner path:

Path=D:\lua54\install\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;d:\LLVM\bin;D:\CMake\;in;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;D:\Rust\bin;D:\Git\cmd;d:\Bandizip\;D:\RTIDDS\rti_connext_dds-6.1.1\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files (x86)\MSBuild\14.0\Bin

Remove everything except the bare minimum:

SET PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
totaam commented 6 months ago

Not heard back, likely an environment problem.

sunzhusz commented 1 month ago

I also encountered the same problem on Windows 7. The PATH was clean and it still didn't work. The cmd reported the same error

totaam commented 1 month ago

@sunzhusz it's definitely an OS / installation / environment issue, check your anti-virus, apps installed, etc