我目前面临window.js_obj的问题 我有一个通过 API 和 jQuery 获得的 JSObject,但是当我尝试将获得的 JSObject 转换为适当的 Python Dict 时,似乎没有名为 js_obj 的模块进入窗口。这是我为转换事物而写的:
userInfo_request = window.js_obj.to_dict(userInfo_request)
(userInfo_request 是我输入时包含的 JSObject 变量
print(type(userInfo_request))
<class 'JSObject'>
我在浏览器控制台中遇到的错误是:
Traceback (most recent call last):
module __main__ line 31
userInfo_request = window.js_obj.to_dict(userInfo_request)
AttributeError: no attribute js_obj for [object Window]
如果有人可以帮助我,那将是非常酷的提前谢谢
我正在使用 Python 3 和 Brython 3.8.7(最新版本)