parkpow / deep-license-plate-recognition

Automatic License Plate Recognition (ALPR) or Automatic Number Plate Recognition (ANPR) software that works with any camera.
https://platerecognizer.com/
MIT License
523 stars 122 forks source link

Forward Hikvision alpr camera events to ParkPow visits #208

Closed danleyb2 closed 4 months ago

danleyb2 commented 4 months ago

Not Tested, No camera

github-actions[bot] commented 4 months ago

Risk Level 2 - /home/runner/work/deep-license-plate-recognition/deep-license-plate-recognition/parkpow/hikvision-lpr/tests.py

The test case should include assertions for the content of the response to ensure that the correct data is being returned. Also, consider using a context manager for opening files to ensure they are properly closed after use.


Risk Level 3 - /home/runner/work/deep-license-plate-recognition/deep-license-plate-recognition/parkpow/hikvision-lpr/app.py

The code should handle potential exceptions when converting confidence to an integer and parsing date_time. Use a more specific exception handling rather than a broad except Exception as e. Also, consider validating environment variables at the start of the application.


Risk Level 4 - /home/runner/work/deep-license-plate-recognition/deep-license-plate-recognition/parkpow/hikvision-lpr/parkpow.py

Raising a generic Exception is not recommended. Define a custom exception or use a built-in exception that more accurately describes the error condition. Additionally, the retry logic should handle specific exceptions and include a backoff strategy to avoid potential rate limiting issues.


🔍🛠️🚦


Powered by Code Review GPT