Monday, April 27, 2015

pyodbc: Works in Plain Python, Django 1.8 Shell Throws Error

Running into a bit of an odd problem I hope someone can help with.

* Ubuntu Server 14.04, 64-bit (Vagrant box)
* Python 3.4
* Django 1.8
* pyodbc 3.0.8

pyodbc installs fine. When I do python3 and then import pyodbc, that works fine.

When I do python3 shell and then import pyodbc, however, I get this:

Got a bit of help in IRC with someone suggested to turn on pdb trace on the run_shell command, which I did, but then I just get this:
*** SystemError: initialization of pyodbc raised unreported exception

I just can't figure out why it'd work in a plain python interpreter but not in the Django shell, and I'm not sure how to diagnose or troubleshoot further.

Appreciate any tips or suggestions anyone might have. Thanks!

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment