openxc / web-logging-example

Example OpenXC web application in Python for vehicle data logging
BSD 3-Clause "New" or "Revised" License
17 stars 5 forks source link

Running the Web Application #2

Open KartikKannapur opened 8 years ago

KartikKannapur commented 8 years ago

I cloned the repository and installed all the requirements, as mentioned in the documenation.

But when I ran 'python recorder.py', it threw the following error:

File "PATH\OpenXC_Vehicle_Simulator\web-logging-example\logconfig\logconfig.py", line 82, in initialize_logging
    'address': syslog_device,
UnboundLocalError: local variable 'syslog_device' referenced before assignment.

The command 'fab runserver', fails at the same point as well.

tobiasoberrauch commented 6 years ago

I had the same experience. Is this project still supported?

peplin commented 6 years ago

This project is intended as a proof of concept, so it's not exactly maintained. The error mentioned should be a quick fix - the logging config is assuming your machine will either have /dev/log or /var/run/syslog:

    if os.path.exists('/dev/log'):
        syslog_device = '/dev/log'
    elif os.path.exists('/var/run/syslog'):
        syslog_device = '/var/run/syslog'

but if you are on Windows (or possibly OS X?) neither device may exist. Two recommendations:

tobiasoberrauch commented 6 years ago

Thank you @peplin I'll try and keep you updated.