fgallina / python-django.el

An Emacs package for managing Django projects.
GNU General Public License v3.0
67 stars 24 forks source link

python-django-open-project fails with my settings.py #4

Closed agriffis closed 11 years ago

agriffis commented 11 years ago

I have a mature Django project that I'm trying to use with python-django.el. I'm a complete newbie at Emacs, coming from a long history with Vim, so this might be more easily debuggable than I realize. Here's the problem:

Django Version:         1.4.2
Project:                ~/src/pp/pp.hg/
Settings:               settings
Virtualenv:             /home/aron/.virtualenvs/pp

An error occurred retrieving project information.
Check your project settings and try again:

Current values:
  + python-django-project-root: ~/src/pp/pp.hg/
  + python-django-project-settings: settings
  + python-shell-interpreter: python
    - found in /home/aron/.virtualenvs/pp/bin/python

Error: Wrong type argument: listp, 17

I tested with a simpler project and that worked fine, and I also tested with this project and an empty settings.py, and that worked fine. Do you have suggestions for how I can track down the problem?

agriffis commented 11 years ago

Ok, I've narrowed it down to a single Django app in my list of INSTALLED_APPS. It's a local app (one of eight in this project)

agriffis commented 11 years ago

Narrowed it down further to logger.debug() at the top-level __init__.py in the app

agriffis commented 11 years ago

Okay, I moved that code to middleware __init__ and it works now, since it's not spewing to console.

fgallina commented 11 years ago

@agriffis I pushed a fix for that in 9d55e0f, so you won't need to hack logger calls for opening the project anymore :)