I am uncertain what is going wrong here. I have made certain that the prereqs were installed, as well as made sure everything is up and running as expected.
If im understanding things correctly, its unable to find something called 'WebView2Loader.dll' which i have verified does exist on my PC.
I am on Windows 11 if that matters.
Terminal text follows.
2023-06-01 07:33:50,264 - Running pokebot on Python 3.11
2023-06-01 07:33:50,761 -
Unable to initialize pokebot!
Please confirm that the Lua Console is open in BizHawk, and that it remains open while the bot is active.
It can be opened through 'Tools > Lua Console'.
Starting in dashboard-only mode...
Exception in thread Thread-1 (mem_pollScreenshot):
Traceback (most recent call last):
File "C:\Users\Carl\Desktop\Bizhawk\pokebot-bizhawk\pokebot-bizhawk-main\bot.py", line 191, in mem_pollScreenshot
screenshot = Image.open(io.BytesIO(shmem))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Carl\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PIL\Image.py", line 3283, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x00000262DED0A390>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Carl\Desktop\Bizhawk\pokebot-bizhawk\pokebot-bizhawk-main\bot.py", line 195, in mem_pollScreenshot
if screenshot is not None:
^^^^^^^^^^
UnboundLocalError: cannot access local variable 'screenshot' where it is not associated with a value
- Serving Flask app 'bot'
- Debug mode: off
[pywebview] WebView2 initialization failed with exception:
Unable to load DLL 'WebView2Loader.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateCoreWebView2EnvironmentWithOptions(String browserExecutableFolder, String userDataFolder, ICoreWebView2EnvironmentOptions options, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environment_created_handler)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.WebView2.WinForms.WebView2.d__25.MoveNext()
2023-06-01 07:33:56,393 - WebView2 initialization failed with exception:
Unable to load DLL 'WebView2Loader.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateCoreWebView2EnvironmentWithOptions(String browserExecutableFolder, String userDataFolder, ICoreWebView2EnvironmentOptions options, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environment_created_handler)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.WebView2.WinForms.WebView2.d__25.MoveNext()