RealistikDash / GDPyS

A Geometry Dash Private Server made in Python.
GNU General Public License v3.0
27 stars 9 forks source link

help relesto with his existential problems with orjson #73

Closed lenforiee closed 3 years ago

RealistikDash commented 3 years ago

I'll really quickly test if this works

RealistikDash commented 3 years ago

After setting up a quick GDPyS instance I receive this issue while using your PR.

Traceback (most recent call last):
  File "/tmp/GDPyS/gdpys.py", line 3, in <module>
    from config import conf
  File "/tmp/GDPyS/config.py", line 76, in <module>
    class Config(ConfigReader):
  File "/tmp/GDPyS/config.py", line 27, in __init_subclass__
    cls.__init__(cls)
  File "/tmp/GDPyS/config.py", line 22, in __init__
    self.json: JsonFile = JsonFile("config.json")
  File "/tmp/GDPyS/helpers/common.py", line 28, in __init__
    self.file = json_load(f)
orjson.JSONDecodeError: Input must be bytes, bytearray, or str: line 1 column 1 (char 0)
lenforiee commented 3 years ago

i will have look to whats happened there

lenforiee commented 3 years ago

ive added another changes sadly orjson.dumps dont have ablility to save to files but atleast load will work

lenforiee commented 3 years ago

there is possibility to fully get potential of orjson but that means we must be sure orjson will install for everyone, other wise config might lock server from even starting on