Open EchoBlam opened 7 months ago
The error message you're seeing is an access violation, which usually occurs when your program tries to read or write to a part of memory that it shouldn't be accessing. This is often due to issues like passing invalid pointers or incorrect data types to low-level functions, particularly when dealing with C extensions or interfacing with libraries like tox
in Python.
Here's a breakdown of possible causes and solutions:
self_set_name
method in tox.py
is likely calling a C function through a Python binding. If the name
variable or the tox_err_set_info
reference is incorrect (for example, an invalid memory address or size mismatch), this can cause the access violation.name
is being constructed and passed to c_size_t
and byref
. Ensure that name
is valid and properly encoded as bytes.tox
library you are using and your Python version. Ensure that the tox
library is fully compatible with Python 3.7.tox
library or Python version to see if the issue persists.name
and the result of len(name)
.If the issue is related to the name
being passed as a string when a different type is expected, you might need to correct how you're handling name
:
name = _login.name.encode('utf-8') if _login.name else b'Toxygen User'
self.tox.self_set_name(name)
If this doesn't help, then the problem might be deeper in the tox
library or its integration with your code, and additional debugging or even inspecting the tox
source code might be necessary.
If none of these solutions work, consider reaching out to the maintainers of the tox
library or searching for similar issues on platforms like GitHub or Stack Overflow. Providing them with the details of your environment (Python version, tox version, OS) will help diagnose the issue faster.
D:\Programs\Python\Python37\python.exe -B "C:/Program Files/JetBrains/PyCharm/plugins/python-ce/helpers/pydev/pydevd.py" --multiprocess --qt-support=auto --client 127.0.0.1 --port 54854 --file C:\Users\lenovo\Desktop\toxygen-master\toxygen\main.py Connected to pydev debugger (build 233.13135.95) C:\Users\lenovo\Desktop\toxygen-master\toxygen Traceback (most recent call last): File "C:/Program Files/JetBrains/PyCharm/plugins/python-ce/helpers/pydev/pydevd.py", line 1534, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "C:\Program Files\JetBrains\PyCharm\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "C:\Users\lenovo\Desktop\toxygen-master\toxygen\main.py", line 487, in
main()
File "C:\Users\lenovo\Desktop\toxygen-master\toxygen\main.py", line 483, in main
toxygen.main()
File "C:\Users\lenovo\Desktop\toxygen-master\toxygen\main.py", line 108, in main
self.tox.self_set_name(bytes(_login.name, 'utf-8') if _login.name else b'Toxygen User')
File "C:\Users\lenovo\Desktop\toxygen-master\toxygen\tox.py", line 356, in self_set_name
c_size_t(len(name)), byref(tox_err_set_info))
OSError: exception: access violation reading 0xFFFFFFFF9419E570