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

Running the Web Application #2

Open
KartikKannapur opened this issue Sep 29, 2015 · 3 comments
Open

Running the Web Application #2

KartikKannapur opened this issue Sep 29, 2015 · 3 comments

Comments

@KartikKannapur
Copy link

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
Copy link

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

@peplin
Copy link
Member

peplin commented Oct 7, 2017

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:

  • Delete the syslog handler, since it's likely overkill anyway
  • Refactor the syslog handler so it's only created if a valid syslog device path is found

@tobiasoberrauch
Copy link

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

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

3 participants