NoFoolLikeOne / EDMC-Screenshot

A plugin for EDMC that detects screenshot events are converts them to PNG format
GNU General Public License v3.0
34 stars 4 forks source link

Traceback when loading on Linux (py 3.8.2) #35

Open A-UNDERSCORE-D opened 4 years ago

A-UNDERSCORE-D commented 4 years ago
loading plugin EDMC-Screenshot-3_4_0 from "/home/ad/.local/share/EDMarketConnector/plugins/EDMC-Screenshot-3.4.0/load.py"
Traceback (most recent call last):
  File "/home/ad/applications/EDMarketConnector-Release-3.99.1.0/plug.py", line 97, in __init__
    module = importlib.machinery.SourceFileLoader('plugin_{}'.format(name.encode(encoding='ascii', errors='replace').decode('utf-8').replace('.', '_')), loadfile).load_module()
  File "<frozen importlib._bootstrap_external>", line 462, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 962, in load_module
  File "<frozen importlib._bootstrap_external>", line 787, in load_module
  File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 702, in _load
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/ad/.local/share/EDMarketConnector/plugins/EDMC-Screenshot-3.4.0/load.py", line 16, in <module>
    from PIL3 import Image
  File "/home/ad/.local/share/EDMarketConnector/plugins/EDMC-Screenshot-3.4.0/PIL3/Image.py", line 90, in <module>
    from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL3' (/home/ad/.local/share/EDMarketConnector/plugins/EDMC-Screenshot-3.4.0/PIL3/__init__.py)

Not much to go on unfortunately. Looks like a PIL3 error but I have not dug further to figure out the cause. Running Ubuntu 20.04, Elite running in Proton

Inexorabilis commented 4 years ago

Can confirm this as well. Running lastest EDMC and plugin. I've tried to reinstall pillow -> No luck Install python-pil via apt -> No luck Copy over the dist-packages file of PIL into PIL3 folder -> No luck

Sadly I have no time currently to dig deeper

chr7 commented 3 years ago

I run into this problem too. I thought to replace the shipped PIL3 (which is version 6.2.1 of the Pillow library) with a newer one but then I run into the next problem. As far as I can see the problem is that the plugin is using Window specific wrapper library, e.g. line 25 of the load.py: from ctypes.wintypes import *

... which fails to work under Linux.

A-UNDERSCORE-D commented 3 years ago

I wrote a much simpler plugin to replace this one, no cropping (well I guess you could use crop in the command), or display or timer, but it does convert. I use it with imagemagik's convert (but it'll run any command you ask it to): https://github.com/A-UNDERSCORE-D/edmc-screenshot-2/

chr7 commented 3 years ago

Thanks, I will give it try.

HalJordan commented 2 years ago

@A-UNDERSCORE-D Is that a standalone plugin, or to replace the load.py in this one?

A-UNDERSCORE-D commented 2 years ago

Its standalone, and will likely only work on linux

HalJordan commented 2 years ago

Okay, so I must have done something wrong. Next play session I'll run edmc from shell and see if I get anything useful. Pretty sure I have imagemagick installed. But I've been wrong before...