text: Title: Failed Update from 8.13.2 to 8.13.4 - Mycodo not working
  Body: Pi: Raspberry PI 4 B 8GB
  OS: Bullseye
  Initial Mycodo version: 8.13.2
  Target Mycodo version. 8.13.4
  
  Initiated update via frontend. After several minutes i tried to reload page but get "Error 502: Bad Gateway Error"
  
  Last lines in mycodo.log:
  `2022-04-04 12:32:06,732 - ERROR - mycodo.modules - Could not load module: Traceback (most recent call last):
    File "/var/mycodo-root/mycodo/utils/modules.py", line 19, in load_module_from_file
      spec.loader.exec_module(module_custom)
    File "<frozen importlib._bootstrap_external>", line 790, in exec_module
    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
    File "/home/plumps/Mycodo/mycodo/widgets/widget_graph_synchronous.py", line 41, in <module>
      from mycodo.mycodo_flask.utils.utils_general import use_unit_generate
    File "/var/mycodo-root/mycodo/mycodo_flask/utils/utils_general.py", line 15, in <module>
      from importlib_metadata import version
  ModuleNotFoundError: No module named 'importlib_metadata'
  
  2022-04-04 12:32:06,776 - ERROR - mycodo.modules - Could not load module: Traceback (most recent call last):
    File "/var/mycodo-root/mycodo/utils/modules.py", line 19, in load_module_from_file
      spec.loader.exec_module(module_custom)
    File "<frozen importlib._bootstrap_external>", line 790, in exec_module
    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
    File "/home/plumps/Mycodo/mycodo/widgets/widget_graph_synchronous.py", line 41, in <module>
      from mycodo.mycodo_flask.utils.utils_general import use_unit_generate
    File "/var/mycodo-root/mycodo/mycodo_flask/utils/utils_general.py", line 15, in <module>
      from importlib_metadata import version
  ModuleNotFoundError: No module named 'importlib_metadata'
  
  2022-04-04 12:32:06,806 - ERROR - mycodo.modules - Could not load module: Traceback (most recent call last):
    File "/var/mycodo-root/mycodo/utils/modules.py", line 19, in load_module_from_file
      spec.loader.exec_module(module_custom)
    File "<frozen importlib._bootstrap_external>", line 790, in exec_module
    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
    File "/home/plumps/Mycodo/mycodo/widgets/widget_graph_synchronous.py", line 41, in <module>
      from mycodo.mycodo_flask.utils.utils_general import use_unit_generate
    File "/var/mycodo-root/mycodo/mycodo_flask/utils/utils_general.py", line 15, in <module>
      from importlib_metadata import version
  ModuleNotFoundError: No module named 'importlib_metadata'
  
  2022-04-04 12:32:06,835 - ERROR - mycodo.modules - Could not load module: Traceback (most recent call last):
    File "/var/mycodo-root/mycodo/utils/modules.py", line 19, in load_module_from_file
      spec.loader.exec_module(module_custom)
    File "<frozen importlib._bootstrap_external>", line 790, in exec_module
    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
    File "/home/plumps/Mycodo/mycodo/widgets/widget_graph_synchronous.py", line 41, in <module>
      from mycodo.mycodo_flask.utils.utils_general import use_unit_generate
    File "/var/mycodo-root/mycodo/mycodo_flask/utils/utils_general.py", line 15, in <module>
      from importlib_metadata import version
  ModuleNotFoundError: No module named 'importlib_metadata'
  
  2022-04-04 12:32:06,857 - ERROR - mycodo.controllers.controller_widget - 'widget_graph_synchronous' is not a valid widget type
  2022-04-04 12:32:06,869 - ERROR - mycodo.modules - Could not load module: Traceback (most recent call last):
    File "/var/mycodo-root/mycodo/utils/modules.py", line 19, in load_module_from_file
      spec.loader.exec_module(module_custom)
    File "<frozen importlib._bootstrap_external>", line 790, in exec_module
    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
    File "/home/plumps/Mycodo/mycodo/widgets/widget_graph_synchronous.py", line 41, in <module>
      from mycodo.mycodo_flask.utils.utils_general import use_unit_generate
    File "/var/mycodo-root/mycodo/mycodo_flask/utils/utils_general.py", line 15, in <module>
      from importlib_metadata import version
  ModuleNotFoundError: No module named 'importlib_metadata'
  
  2022-04-04 12:32:06,890 - ERROR - mycodo.controllers.controller_widget - 'widget_graph_synchronous' is not a valid widget type
  2022-04-04 12:32:06,890 - ERROR - mycodo.controllers.controller_widget - 'widget_graph_synchronous' is not a valid widget type
  2022-04-04 12:32:06,890 - ERROR - mycodo.controllers.controller_widget - 'widget_graph_synchronous' is not a valid widget type
  2022-04-04 12:32:06,891 - INFO - mycodo.controllers.controller_widget - Activated in 204.4 ms
  2022-04-04 12:32:07,892 - INFO - mycodo.daemon - Mycodo daemon started in 4.267 seconds
  2022-04-04 12:32:07,894 - INFO - mycodo.daemon - 56.29 MB RAM in use`
  
  Laste 50 lines via "journalctl -u mycodoflask | tail -n 50":
  `Apr 04 12:31:21 plumpsrpi python[499]: [2022-04-04 12:31:21 +0200] [499] [INFO] Starting gunicorn 20.1.0
  Apr 04 12:31:21 plumpsrpi python[499]: [2022-04-04 12:31:21 +0200] [499] [INFO] Listening at: unix:/usr/local/mycodoflask.sock (499)
  Apr 04 12:31:21 plumpsrpi python[499]: [2022-04-04 12:31:21 +0200] [499] [INFO] Using worker: gthread
  Apr 04 12:31:21 plumpsrpi python[584]: [2022-04-04 12:31:21 +0200] [584] [INFO] Booting worker with pid: 584
  Apr 04 12:31:27 plumpsrpi python[584]: [2022-04-04 12:31:27 +0200] [584] [ERROR] Exception in worker process
  Apr 04 12:31:27 plumpsrpi python[584]: Traceback (most recent call last):
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/var/mycodo-root/env/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
  Apr 04 12:31:27 plumpsrpi python[584]:     worker.init_process()
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/var/mycodo-root/env/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
  Apr 04 12:31:27 plumpsrpi python[584]:     super().init_process()
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/var/mycodo-root/env/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
  Apr 04 12:31:27 plumpsrpi python[584]:     self.load_wsgi()
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/var/mycodo-root/env/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
  Apr 04 12:31:27 plumpsrpi python[584]:     self.wsgi = self.app.wsgi()
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/var/mycodo-root/env/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
  Apr 04 12:31:27 plumpsrpi python[584]:     self.callable = self.load()
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/var/mycodo-root/env/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
  Apr 04 12:31:27 plumpsrpi python[584]:     return self.load_wsgiapp()
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/var/mycodo-root/env/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
  Apr 04 12:31:27 plumpsrpi python[584]:     return util.import_app(self.app_uri)
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/var/mycodo-root/env/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
  Apr 04 12:31:27 plumpsrpi python[584]:     mod = importlib.import_module(module)
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
  Apr 04 12:31:27 plumpsrpi python[584]:     return _bootstrap._gcd_import(name[level:], package, level)
  Apr 04 12:31:27 plumpsrpi python[584]:   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  Apr 04 12:31:27 plumpsrpi python[584]:   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  Apr 04 12:31:27 plumpsrpi python[584]:   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  Apr 04 12:31:27 plumpsrpi python[584]:   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  Apr 04 12:31:27 plumpsrpi python[584]:   File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  Apr 04 12:31:27 plumpsrpi python[584]:   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/home/plumps/Mycodo/mycodo/start_flask_ui.py", line 11, in <module>
  Apr 04 12:31:27 plumpsrpi python[584]:     from mycodo.mycodo_flask.app import create_app
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/home/plumps/Mycodo/mycodo/mycodo_flask/app.py", line 28, in <module>
  Apr 04 12:31:27 plumpsrpi python[584]:     from mycodo.mycodo_flask import routes_admin
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/home/plumps/Mycodo/mycodo/mycodo_flask/routes_admin.py", line 47, in <module>
  Apr 04 12:31:27 plumpsrpi python[584]:     from mycodo.mycodo_flask.routes_static import inject_variables
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/home/plumps/Mycodo/mycodo/mycodo_flask/routes_static.py", line 28, in <module>
  Apr 04 12:31:27 plumpsrpi python[584]:     from mycodo.mycodo_flask.forms import forms_dashboard
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/home/plumps/Mycodo/mycodo/mycodo_flask/forms/forms_dashboard.py", line 19, in <module>
  Apr 04 12:31:27 plumpsrpi python[584]:     from mycodo.mycodo_flask.utils.utils_general import generate_form_widget_list
  Apr 04 12:31:27 plumpsrpi python[584]:   File "/home/plumps/Mycodo/mycodo/mycodo_flask/utils/utils_general.py", line 15, in <module>
  Apr 04 12:31:27 plumpsrpi python[584]:     from importlib_metadata import version
  Apr 04 12:31:27 plumpsrpi python[584]: ModuleNotFoundError: No module named 'importlib_metadata'
  Apr 04 12:31:27 plumpsrpi python[584]: [2022-04-04 12:31:27 +0200] [584] [INFO] Worker exiting (pid: 584)
  Apr 04 12:31:28 plumpsrpi python[499]: [2022-04-04 12:31:28 +0200] [499] [INFO] Shutting down: Master
  Apr 04 12:31:28 plumpsrpi python[499]: [2022-04-04 12:31:28 +0200] [499] [INFO] Reason: Worker failed to boot.
  Apr 04 12:31:28 plumpsrpi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
  Apr 04 12:31:28 plumpsrpi systemd[1]: mycodoflask.service: Failed with result 'exit-code'.
  Apr 04 12:31:28 plumpsrpi systemd[1]: mycodoflask.service: Consumed 7.176s CPU time.`
  