fabianonline / OctoPrint-Telegram

Plugin for octoprint to send status messages and receive commands via Telegram messenger.
312 stars 114 forks source link

Plugin not Loading: undefined symbol: xcb_xc_oisc_id #401

Open mkrasselt1 opened 2 years ago

mkrasselt1 commented 2 years ago

I Noticed the plugin beeing gone on my machine some time ago, and now started to investigate. Turns out its requiring as symbol from a image librarry, that no longer exists?

2022-03-29 21:38:10,356 - octoprint.plugin.core - ERROR - Error loading plugin telegram
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 1291, in _import_plugin
    module = _load_module(module_name, spec)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 68, in _load_module
    return imp.load_module(name, f, filename, details)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/vendor/imp.py", line 238, in load_module
    return load_package(name, filename)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/vendor/imp.py", line 212, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_telegram/__init__.py", line 2, in <module>
    from PIL import Image
  File "/home/pi/oprint/lib/python3.7/site-packages/PIL/Image.py", line 114, in <module>
    from . import _imaging as core
ImportError: /usr/lib/arm-linux-gnueabihf/libxcb.so.1: undefined symbol: xcb_xc_oisc_id
mkrasselt1 commented 2 years ago

i tempoary solved it by commenting out "from PIL import Image" from init.py and it made it work again, but without gif support

2022-03-30 10:10:21,840 - octoprint.plugins.telegram.listener - INFO - Got a command: '/gif' with parameter: '' in chat 496195168
2022-03-30 10:10:21,846 - octoprint.plugins.telegram.TCMD - INFO - Will try to create a gif
2022-03-30 10:10:22,161 - octoprint.plugins.telegram - ERROR - Caught an exception trying clean previous images : [Errno 2] No such file or directory: '/home/pi/.octoprint/data/telegram/tmpgif/gif.mp4'
2022-03-30 10:10:22,231 - octoprint.plugins.telegram - INFO - test if nice exist
2022-03-30 10:10:22,232 - octoprint.plugins.telegram - INFO - test exist program 'nice', '--version'
2022-03-30 10:10:22,267 - octoprint.plugins.telegram - INFO - ret = 0
2022-03-30 10:10:22,269 - octoprint.plugins.telegram - INFO - test if cpulimit exist
2022-03-30 10:10:22,269 - octoprint.plugins.telegram - INFO - test exist program 'cpulimit', '--help'
2022-03-30 10:10:22,313 - octoprint.plugins.telegram - INFO - ret = 1
2022-03-30 10:10:22,314 - octoprint.plugins.telegram - INFO - test if ffmpeg exist
2022-03-30 10:10:22,315 - octoprint.plugins.telegram - INFO - test exist program 'ffmpeg', '-h'
2022-03-30 10:10:22,431 - octoprint.plugins.telegram - INFO - ret = 127
2022-03-30 10:10:22,770 - octoprint.plugins.telegram - INFO - sec=5
2022-03-30 10:10:22,774 - octoprint.plugins.telegram - INFO - timeSec=11:11:05
2022-03-30 10:10:22,776 - octoprint.plugins.telegram - INFO - limit_cpu=130.0 | used_cpu=2.0 | because nb_cpu=4
2022-03-30 10:10:22,781 - octoprint.plugins.telegram - INFO - will now create the video  'nice', '-n', '20', 'cpulimit', '-l', '130.0', '-f', '-z', '--', 'ffmpeg', '-y', '-threads', '2.0', '-i', 'http://localhost/webcam/?action=stream', '-t', '11:11:05', '-pix_fmt', 'yuv420p', '/home/pi/.octoprint/data/telegram/tmpgif/gif.mp4'
2022-03-30 10:10:23,904 - octoprint.plugins.telegram - INFO - Finish the video

Also i have seen this error, not shure if related or not:

2022-03-30 10:07:12,787 - octoprint.plugins.telegram - ERROR - Caught an exception in loop chatId for key: 496XXXXXX => 'Home'
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_telegram/__init__.py", line 1641, in send_msg
    self.chats[key]["notifications"][kwargs["event"]]
KeyError: 'Home'
mkrasselt1 commented 2 years ago

it seams like ffmpeg has a problem - the same that causes im port image to fail, i will try to reinstall my octoprint on a clean sd card, lets check if that changes anything