aerosense-ai / data-gateway

Data influx for Aerosense.
https://www.aerosense.ai/
Other
3 stars 1 forks source link

Fix bugs, simplify/fix dependencies, and improve deployment process #60

Closed cortadocodes closed 2 years ago

cortadocodes commented 2 years ago

Contents (#60)

Enhancements

Fixes

Operations

Dependencies

Documentation

Other

codecov-commenter commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (feature/multiple-node-support@9fd7503). Click here to learn what that means. The diff coverage is n/a.

@@                       Coverage Diff                        @@
##             feature/multiple-node-support      #60   +/-   ##
================================================================
  Coverage                                 ?   78.95%           
================================================================
  Files                                    ?       14           
  Lines                                    ?      765           
  Branches                                 ?        0           
================================================================
  Hits                                     ?      604           
  Misses                                   ?      161           
  Partials                                 ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9fd7503...88143f7. Read the comment docs.

cortadocodes commented 2 years ago

After switching to instantiating serial.Serial in the Reader process as well as the MainProcess, the following error is now raised when starting the gateway on Windows

<Result SerialException("could not open port 'COM12': PermissionError(13, 'Access is denied.', None, 5)")>
Process Reader:
Traceback (most recent call last):
  File "C:\Users\rapha\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\rapha\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "c:\Workspace\data-gateway\data_gateway\packet_reader.py", line 81, in read_packets
    serial_port = get_serial_port(
  File "c:\Workspace\data-gateway\data_gateway\serial_port.py", line 27, in get_serial_port
    serial_port = serial.Serial(port=serial_port_name, baudrate=configuration.baudrate)
  File "C:\Workspace\data-gateway\venv\lib\site-packages\serial\serialwin32.py", line 33, in __init__
    super(Serial, self).__init__(*args, **kwargs)
  File "C:\Workspace\data-gateway\venv\lib\site-packages\serial\serialutil.py", line 244, in __init__
    self.open()
  File "C:\Workspace\data-gateway\venv\lib\site-packages\serial\serialwin32.py", line 64, in open
    raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'COM12': PermissionError(13, 'Access is denied.', None, 5)
<Result SerialException("could not open port 'COM12': PermissionError(13, 'Access is denied.', None, 5)")>
<Result okay>