No module named 'apscheduler'

When I install a plugin, there is an error "ModuleNotFoundError: No Module named 'apscheduler'". I tried to install the plugin via Octoprint's Plugin Manager and manual method, but neither worked and the same error was shown. Plus, I tried to install APScheduler in different locations, such as the base, in raspberry pi. But None of them worked, and same error.

2021-03-16 02:53:02,811 - octoprint.plugin.core - ERROR - Error loading plugin CMfgDataAcquisition
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 1298, in _import_plugin
    module = _load_module(module_name, spec)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 69, 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_CMfgDataAcquisition/__init__.py", line 13, in <module>
    from apscheduler.schedulers.background import BackgroundScheduler
ModuleNotFoundError: No module named 'apscheduler'

OS: Linux
Raspberry model: Raspberry Pi 4 Model B Rev 1.2
Octopi_version: 0.18.0
OctoPrint_version: 1.5.2
python: 3.7.3

Do you have a link to the plugin? I can't see it in the repository.

This is probably a bug in the plugin itself, and not something that is fixable without modifying the plugin's code.

quick search on github found this...GitHub - zhaojunqin93/CmfgdataacquisitionPlugin: A texting example plugin for cloud manufacturing based data acquistion plugin. Handover from Jacky Su the plugin doesn't include apscheduler in its plugin_requires parameter.

you should be able to connect to your pi via SSH and run ~/oprint/bin/pip install apscheduler.

you probably also want to install influxdb_client as well with ~/oprint/bin/pip install influxdb_client

@zhaojun if I were you I also wouldn't be including my own personal influx_db API keys and such unless you want someone else to mess with your server.

Hi, could you please have a look at the repository? GitHub - zhaojunqin93/CmfgdataacquisitionPlugin: A texting example plugin for cloud manufacturing based data acquistion plugin. Handover from Jacky Su

Thanks for your answer! I will give it try and let you know the results. :grinning:

Yes, and I have already install influxdb_client as well. Thanks again.

Thank you for your suggestion. In most cases, this github repository will be set in private.