【发布时间】:2022-07-13 17:38:43
【问题描述】:
我按照 https://pypi.org/project/pywebview/ 所示的方式进行了安装,并且我使用了示例代码
import webview
webview.create_window('Hello world', 'https://pywebview.flowrl.com/hello')
webview.start()
这是我得到的完整错误
Unbehandelte Ausnahme: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei System.Windows.Forms.Control.get_CacheTextInternal()
bei System.Windows.Forms.Control.get_Text()
bei System.Windows.Forms.Control.set_Text(String value)
--- Ende der Stapel�berwachung vom vorhergehenden Ort, an dem die Ausnahme ausgel�st wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei Python.Runtime.PythonException.ThrowLastAsClrException()
bei Python.Runtime.Dispatcher.TrueDispatch(Object[] args)
bei Python.Runtime.Dispatcher.Dispatch(Object[] args)
bei __System_Threading_ThreadStartDispatcher.Invoke()
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
我尝试调试 webview.start()。尽管
windows[0]
不是空的,但它在
guilib.create_window(windows[0])
处崩溃