We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug
Installed from pip
Windows 11
python --version
3.12
pip show pythonmonkey
1.1.0
The first time I call the clientHttp function, it works fine, but when I call it more than once, I get the following error:
clientHttp
error: NetworkError: Error: Python AttributeError: 'NoneType' object has no attribute 'connect' DOMException@C:/Users/emanu/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0/LocalCache/local-packages/Python312/site-packages/pythonmonkey/node_modules/core-js/modules/web.dom-exception.constructor.js:64:17 #handleErrors@C:/Users/emanu/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0/LocalCache/local-packages/Python312/site-packages/pythonmonkey/builtin_modules/XMLHttpRequest.js:452:48 C_Users_emanu_AppData_Local_Packages_PythonSoftwareFoundation_Python_3_12_qbz5n2kfra8p0_LocalCache_local_packages_Python312_site_packages_pythonmonkey_builtin_modules_XMLHttpRequest_js/#sendAsync/<@C:/Users/emanu/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0/LocalCache/local-packages/Python312/site-packages/pythonmonkey/builtin_modules/XMLHttpRequest.js:429:38,
function clientHttp(url, options = {}) { return new Promise((resolve, reject) => { const { method = 'GET' } = options const xhr = new XMLHttpRequest() xhr.open(method, url, true) setHeaders(options.headers, xhr) const token = read('token.txt') setAuthorization(xhr, token) xhr.onerror = (e) => { console.log('xhr error:', e) reject(xhr.statusText) } xhr.onload = () => { if (xhr.status >= 200 && xhr.status < 300) { return resolve(parseBody(xhr)) } return reject(parseBody(xhr)) }; xhr.send(options.body) }) }
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue type
Bug
How did you install PythonMonkey?
Installed from pip
OS platform and distribution
Windows 11
Python version (
python --version
)3.12
PythonMonkey version (
pip show pythonmonkey
)1.1.0
Bug Description
The first time I call the
clientHttp
function, it works fine, but when I call it more than once, I get the following error:Standalone code to reproduce the issue
Relevant log output or backtrace
Additional info if applicable
What branch of PythonMonkey were you developing on? (If applicable)
No response
The text was updated successfully, but these errors were encountered: