Skip to content

Python 3.13 loading error #37

@YarnSaw

Description

@YarnSaw

Trying to load this on python 3.13, it's been reported to hit this error:

pythonmonkey.SpiderMonkeyError: Error in file C:\Users\<username>\AppData\Local\Programs\Python\python313\Lib\site-packages\dcp\js\node_modules\dcp-client\fs-basic.py, on line 12, column 1:

Error: Python ValueError: embedded null character

Traceback (most recent call last):

File "C:\Users\<username>\AppData\Local\Programs\Python\python313\Lib\site-packages\dcp\js\node_modules\dcp-client\fs-basic.py", line 12, in readFile

 

JS Stack Trace:

  iife@C:\Users\<username>\AppData\Local\Programs\Python\python313\Lib\site-packages\dcp\js\node_modules\dcp-client\index.py:84:30

Which was manually mitigated by editing dcp-client/fs-basic.py with

def readFile(filename: str) -> str:
    clean = filename.replace(chr(0), "")
    with open(clean, "r", encoding="utf8") as fileHnd:
        return fileHnd.read()

May be an issue with pythonmonkey, not sure where/how the null bit got in there (username appears to be ascii, but may not be - issue with charset?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions