Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New bug :( #37

Closed
richiejarvis opened this issue Jul 2, 2019 · 12 comments
Closed

New bug :( #37

richiejarvis opened this issue Jul 2, 2019 · 12 comments

Comments

@richiejarvis
Copy link

Hi Claude,

I've not investigated yet, but I note you are in the process of changing the time format. Well, it breaks it :(

I've roll my Production instances to the previous version, but wanted to let you know ASAP, so sorry for the 'raw' bug report.

Cheers,

Richie

Loading ...
----------------------------------------------------------------------
speed-cam.py 9.21   written by Claude Pageau
2019-07-02 16:54:32 INFO     <module>   Pi Camera Module is Enabled and Connected supported=1 detected=1
----------------------------------------------------------------------
Note: To Send Full Output to File Use command
python -u ./speed-cam.py | tee -a log.txt
Set log_data_to_file=True to Send speed_Data to CSV File speed-cam.log
----------------------------------------------------------------------

Debug Messages .. verbose=True  display_fps=False calibrate=False
                  show_out_range=True
Plugins ......... pluginEnable=False  pluginName=picam240
Calibration ..... cal_obj_px_L2R=60 px  cal_obj_mm_L2R=5182 mm  speed_conv_L2R=0.19320
                  cal_obj_px_R2L=75 px  cal_obj_mm_R2L=5182 mm  speed_conv_R2L=0.15456
                  (Change Settings in /home/pi/speed-camera/config.py)
Logging ......... Log_data_to_CSV=True  log_filename=speed-cam.csv (CSV format)
                  loggingToFile=False  logFilePath=speed-cam.log
                  SQLITE3 DB_PATH=/home/pi/speed-camera/data/speed_cam.db  DB_TABLE=speed
Speed Trigger ... Log only if max_speed_over > 0 mph
                  and track_counter >= 5 consecutive motion events
Exclude Events .. If  x_diff_min < 1 or x_diff_max > 20 px
                  If  y_upper < 75 or y_lower > 185 px
                  or  x_left < 5 or x_right > 315 px
                  If  max_speed_over < 0 mph
                  If  event_timeout > 0.30 seconds Start New Track
                  track_timeout=0.00 sec wait after Track Ends (avoid retrack of same object)
Speed Photo ..... Size=960x720 px  image_bigger=3.0  rotation=0  VFlip=False  HFlip=False
                  image_path=media/images  image_Prefix=speed-
                  image_font_size=12 px high  image_text_bottom=True
Motion Settings . Size=320x240 px  px_to_kph_L2R=0.310920  px_to_kph_R2L=0.248736 speed_units=mph
OpenCV Settings . MIN_AREA=100 sq-px  BLUR_SIZE=10  THRESHOLD_SENSITIVITY=20  CIRCLE_SIZE=5 px
                  WINDOW_BIGGER=1 gui_window_on=False (Display OpenCV Status Windows on GUI Desktop)
                  CAMERA_FRAMERATE=20 fps video stream speed
Sub-Directories . imageSubDirMaxHours=1 (0=off)  imageSubDirMaxFiles=1000 (0=off)
                  imageRecentDir=media/recent imageRecentMax=0 (0=off)
Disk Space  ..... Disabled - spaceTimerHrs=0  Manage Target Free Disk Space. Delete Oldest jpg Files
                  spaceTimerHrs=0 (0=Off) Target spaceFreeMB=500 (min=100 MB)

----------------------------------------------------------------------
2019-07-02 16:54:32 INFO     <module>   Initializing Pi Camera ....
2019-07-02 16:54:35 INFO     isSQLite3  Success: File is sqlite3 Format /home/pi/speed-camera/data/speed_cam.db
2019-07-02 16:54:35 INFO     db_check   Success: sqlite3 Connected to DB /home/pi/speed-camera/data/speed_cam.db
2019-07-02 16:54:35 INFO     speed_camera sqlite3 DB is Open /home/pi/speed-camera/data/speed_cam.db
2019-07-02 16:54:35 INFO     speed_notify Plugin Disabled per pluginEnable=False
2019-07-02 16:54:35 INFO     speed_notify Logging to Console per Variable verbose=True
2019-07-02 16:54:35 INFO     speed_notify Press ctrl-c in this terminal session to Quit
2019-07-02 16:54:35 INFO     speed_notify Begin Motion Tracking .....
2019-07-02 16:54:36 INFO     speed_camera Reset- event_timer 0.94>0.30 sec Exceeded
2019-07-02 16:54:36 INFO     speed_camera New  - 0/5 xy(40,29) Start New Track
2019-07-02 16:54:36 INFO     speed_camera  Add - 1/5 xy(50,30) 50.91 mph D=10/20 C=1 65x26=1081 sqpx L2R
2019-07-02 16:54:36 INFO     speed_camera  Add - 2/5 xy(62,33) 30.91 mph D=12/20 C=1 63x23=999 sqpx L2R
2019-07-02 16:54:36 INFO     speed_camera  Add - 3/5 xy(73,32) 62.54 mph D=11/20 C=1 62x25=1001 sqpx L2R
2019-07-02 16:54:36 INFO     speed_camera  Add - 4/5 xy(84,33) 31.28 mph D=11/20 C=1 61x24=966 sqpx L2R
2019-07-02 16:54:36 INFO     speed_camera  Add - 5/5 xy(94,33) 53.28 mph D=10/20 C=1 61x24=959 sqpx L2R
Traceback (most recent call last):
  File "./speed-cam.py", line 1467, in <module>
    speed_camera() # run main speed camera processing loop
  File "./speed-cam.py", line 1160, in speed_camera
    image_path, image_prefix)
  File "./speed-cam.py", line 700, in subDirChecks
    if subDirCheckMaxHrs(subDirPath, maxHours, prefix):
  File "./speed-cam.py", line 669, in subDirCheckMaxHrs
    dirDate = datetime.datetime.strptime(dirStr, "%Y-%m-%d-%H:%M")
  File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime
    (data_string, format))
ValueError: time data '20190702-1643' does not match format '%Y-%m-%d-%H:%M'
@pageauc
Copy link
Owner

pageauc commented Jul 2, 2019

This is used to name sub folders and did not previously have a problem I checked my speed camera and it changed directories fine. Will do some more testing to see if I can duplicate error.

@richiejarvis
Copy link
Author

Ahhhh - is it complaining about my old speedcam.db data then??

@pageauc
Copy link
Owner

pageauc commented Jul 2, 2019 via email

@richiejarvis
Copy link
Author

Hi Claude,

Thank you. I just came to report the same to you! So we both found it. Cool :)

I was planning to rotate dirs each day, that was all. I'll carry on playing!

Btw - my third camera just went live in a different location in the village, and I can give you read-only dashboard access if you are curious to watch your creation in action :)

Cheers,

Richie

@pageauc
Copy link
Owner

pageauc commented Jul 2, 2019 via email

@richiejarvis
Copy link
Author

btw - i am in the process of transferring the data from my lab up, so please excuse the lack of data!

@pageauc
Copy link
Owner

pageauc commented Jul 3, 2019 via email

@richiejarvis
Copy link
Author

richiejarvis commented Jul 3, 2019 via email

@pageauc
Copy link
Owner

pageauc commented Jul 3, 2019 via email

@pageauc
Copy link
Owner

pageauc commented Jul 9, 2019 via email

@richiejarvis
Copy link
Author

richiejarvis commented Jul 9, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants