CMDR-Kiel42 / EDMC_SpanshRouter

A plugin for EDMC to make your life easier when using Spansh
47 stars 18 forks source link

ImportError: No module named PlaceHolder #19

Closed katanacrimson closed 4 years ago

katanacrimson commented 4 years ago

Literally just installed 3.0.0, and I'm running into the following:

loading plugin SpanshRouter from "C:\Users\katana\AppData\Local\EDMarketConnector\plugins\SpanshRouter\load.py"
Traceback (most recent call last):
  File "plug.pyo", line 193, in load_plugins
  File "plug.pyo", line 94, in __init__
  File "C:\Users\katana\AppData\Local\EDMarketConnector\plugins\SpanshRouter\load.py", line 4, in <module>
  File "C:\Users\katana\AppData\Local\EDMarketConnector\plugins\SpanshRouter\SpanshRouter\__init__.py", line 1, in <module>
  File "C:\Users\katana\AppData\Local\EDMarketConnector\plugins\SpanshRouter\SpanshRouter\SpanshRouter.py", line 12, in <module>
  File "C:\Users\katana\AppData\Local\EDMarketConnector\plugins\SpanshRouter\SpanshRouter\AutoCompleter.py", line 7, in <module>
ImportError: No module named PlaceHolder

I do have PlaceHolder.py and PlaceHolderEntry.py in the same dir as siblings of the other files (updater, spanshrouter, etc.) but it doesn't appear that they compiled - no .pyo files exist.

katanacrimson commented 4 years ago

The import style used here differs from the rest:

https://github.com/CMDR-Kiel42/EDMC_SpanshRouter/blob/master/SpanshRouter/AutoCompleter.py#L7

versus

https://github.com/CMDR-Kiel42/EDMC_SpanshRouter/blob/master/SpanshRouter/SpanshRouter.py#L12

Going to try hand-modifying to see.

katanacrimson commented 4 years ago

Switching to .PlaceHolder as the import, instead of SpanshRouter.PlaceHolder resolved a number of issues, however it's now failing on something involving tk.

Traceback (most recent call last):
  File "plug.pyo", line 193, in load_plugins
  File "plug.pyo", line 98, in __init__
  File "C:\Users\katana\AppData\Local\EDMarketConnector\plugins\SpanshRouter\load.py", line 17, in plugin_start
  File "C:\Users\katana\AppData\Local\EDMarketConnector\plugins\SpanshRouter\SpanshRouter\SpanshRouter.py", line 46, in __init__
NameError: global name 'tk' is not defined
katanacrimson commented 4 years ago

Got it - appears to be running via python2 code paths, and the import no longer is aliased the same.

Going to downgrade to v2.

CMDR-Kiel42 commented 4 years ago

Thanks for the info. I've switched version 3.0.0 to "pre-release". Turns out I've been testing the python 3 version of EDMC all along... I'll fix all of this and release once I'm sure it works with both versions

CMDR-Kiel42 commented 4 years ago

@damianb The pre-release 3.0.1 should fix these issues. I've asked a few people to test it for me this time. You're welcome to try it as well if you wish!