efroemling / ballistica

The BombSquad Game Engine
Other
533 stars 106 forks source link

Headless Server not working if your username is in another language in Windows. #730

Open SnobbishContainer9 opened 2 months ago

SnobbishContainer9 commented 2 months ago

Description

BombSquad headless server doesn't work with any other than English username in Windows.

Steps to reproduce

1 Create non-english username in Windows

  1. Place Headless server in forlder after С:/Users/UsernameHere
  2. Launch it.

Machine

Platform: Windows (any version) BombSquad version: 1.7.37 (but i guess it's not working since ages.) Error log:

C:\Users\User\Desktop\Новая папка\BombSquad_Server_Windows_1.7.37>dist\\python.
exe bombsquad_server.py
Could not find platform independent libraries <prefix>
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'dist\\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  safe_path = 0
  import site = 1
  is in build tree = 0
  stdlib dir = 'C:\Users\\u0421\u041b\u0410\u0412\u0410\Desktop\\u041d\u043e\u04
32\u0430\u044f \u043f\u0430\u043f\u043a\u0430\BombSquad_Server_Windows_1.7.37\Li
b'
  sys._base_executable = 'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u
041d\u043e\u0432\u0430\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Wi
ndows_1.7.37\\dist\\python.exe'
  sys.base_prefix = 'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u041d\
u043e\u0432\u0430\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Windows
_1.7.37'
  sys.base_exec_prefix = 'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u
041d\u043e\u0432\u0430\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Wi
ndows_1.7.37'
  sys.platlibdir = 'DLLs'
  sys.executable = 'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u041d\u
043e\u0432\u0430\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Windows_
1.7.37\\dist\\python.exe'
  sys.prefix = 'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u041d\u043e
\u0432\u0430\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Windows_1.7.
37'
  sys.exec_prefix = 'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u041d\
u043e\u0432\u0430\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Windows
_1.7.37'
  sys.path = [
    'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u041d\u043e\u0432\u043
0\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Windows_1.7.37\\dist\\p
ython312.zip',
    'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u041d\u043e\u0432\u043
0\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Windows_1.7.37',
    'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u041d\u043e\u0432\u043
0\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Windows_1.7.37\\Lib',
    'C:\\Users\\\u0421\u041b\u0410\u0412\u0410\\Desktop\\\u041d\u043e\u0432\u043
0\u044f \u043f\u0430\u043f\u043a\u0430\\BombSquad_Server_Windows_1.7.37\\dist',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000047c (most recent call first):
  <no Python frame> 
brostosjoined commented 2 months ago

Windows 11

C:\Users\Узерн\Desktop\BombSquad_Server_Windows_1.7.37>dist\\python.exe -O bombsquad_server.py
BombSquad server manager 1.3.2 starting up (opt mode)...
Interactive mode enabled; use the 'mgr' object to interact with the server.
Type 'help(mgr)' for more information.
Valid server config file loaded.
Launching server subprocess...
>>> Error: Provided config-dir path 'C:\Users\?????\Desktop\BombSquad_Server_Windows_1.7.37\dist\ba_root' is not a directory.Server subprocess exited with code 1.
Stopping subprocess...
Subprocess stopped.
Valid server config file loaded.
Launching server subprocess...
Error: Provided config-dir path 'C:\Users\?????\Desktop\BombSquad_Server_Windows_1.7.37\dist\ba_root' is not a directory.Server subprocess exited with code 1.
Stopping subprocess...
Subprocess stopped.
efroemling commented 2 months ago

Thanks for the heads-up. I had done some work at some point to try and support non-ascii characters in filenames on Windows but either I missed something here or that broke. Are you able to run the GUI version from under that directory or the headless binary directly (without going through the server wrapper script)? That might help me determine if the problem is in the binary or the server wrapper.

brostosjoined commented 2 months ago

Its seems the issue is with the wrapper script, using headless binary launches without any issues