user202729 / plover_websocket_server

A server for exposing Plover engine events and functionality
GNU General Public License v3.0
1 stars 1 forks source link

Plugin won't work, throws error in the console when loading #10

Closed NSGauge closed 1 month ago

NSGauge commented 1 month ago

After installing the plugin I was unable to enable it in the Configure/Plugins menu, as it didn't show up there. After running Plover (debug) I discovered the following error in the console:

2024-09-12 14:07:13,558 [MainThread] ERROR: error loading extension plugin: plover_engine_server (from plover_engine_server.manager)
Traceback (most recent call last):
  File "build/windist/data\Lib\site-packages\plover\registry.py", line 55, in register_plugin_from_entrypoint
  File "build/windist/data\Lib\site-packages\pkg_resources\__init__.py", line 2450, in load
  File "build/windist/data\Lib\site-packages\pkg_resources\__init__.py", line 2456, in resolve
  File "C:\Users\school\AppData\Local\plover\plover\plugins\win\Python39\site-packages\plover_engine_server\manager.py", line 26, in <module>
    from plover_engine_server.websocket.server import WebSocketServer
  File "C:\Users\school\AppData\Local\plover\plover\plugins\win\Python39\site-packages\plover_engine_server\websocket\server.py", line 16, in <module>
    from plover_engine_server.websocket.routes import setup_routes
  File "C:\Users\school\AppData\Local\plover\plover\plugins\win\Python39\site-packages\plover_engine_server\websocket\routes.py", line 5, in <module>
    from plover_engine_server.websocket.views import index, protocol, websocket_handler
  File "C:\Users\school\AppData\Local\plover\plover\plugins\win\Python39\site-packages\plover_engine_server\websocket\views.py", line 7, in <module>
    from plover_engine_server.websocket.server import APIContext
ImportError: cannot import name 'APIContext' from partially initialized module 'plover_engine_server.websocket.server' (most likely due to a circular import) (C:\Users\school\AppData\Local\plover\plover\plugins\win\Python39\site-packages\plover_engine_server\websocket\server.py)
NSGauge commented 1 month ago

Further info:

Plover version: Plover 4.0.0rc2

OS: Windows 11 Home

Plover's python version (as far as I understand): Python 3.9.7

Installed packages:

$ plover_console.exe -s plover_plugins list

Package                  Version
------------------------ ------------
aiohappyeyeballs         2.4.0
aiohttp                  3.10.5
aiosignal                1.3.1
appdirs                  1.4.4
async-timeout            4.0.3
attrs                    21.2.0
bleach                   4.1.0
cattrs                   1.8.0
certifi                  2021.10.8
cffi                     1.15.0
charset-normalizer       2.0.7
cmarkgfm                 0.6.0
docutils                 0.18
frozenlist               1.4.1
hidapi                   0.11.0.post2
idna                     3.3
jsonpickle               3.3.0
multidict                6.1.0
packaging                21.0
pip                      21.3.1
pkginfo                  1.7.1
plover                   4.0.0rc2
plover-dict-commands     0.2.5
plover_engine_server_2   0.1.1
plover-fancytext         1.9.0
plover-lapwing-aio       1.2.2
plover-last-translation  0.0.2
plover-modal-dictionary  0.0.3
plover-plugins-manager   0.7.1
plover-python-dictionary 1.1.0
plover-stitching         0.1.0
plover-stroke            1.1.0
plover-treal             1.0.1
pycparser                2.20
pyfiglet                 1.0.2
Pygments                 2.10.0
pyparsing                3.0.3
PyQt5                    5.15.6
PyQt5-Qt5                5.15.2
PyQt5-sip                12.9.0
pyserial                 3.5
readme-renderer          30.0
requests                 2.26.0
requests-cache           0.9.1
requests-futures         1.0.0
rtf-tokenize             1.0.0
setuptools               58.3.0
six                      1.16.0
typing_extensions        4.12.2
url-normalize            1.4.3
urllib3                  1.26.7
wcwidth                  0.2.5
webencodings             0.5.1
wheel                    0.37.0
yarl                     1.11.1
user202729 commented 1 month ago

I haven't used this plugin myself for a long time... but anyway it appears to be fixed now.