Code works in "Run" but not in "Debug" (Django)

Running a remote debugging environment...everything works great, except the following:

I am interfacing to a package called recoll.

If I RUN my App, recoll is imported properly.

If I DEBUG my App, recoll.py spits out some errors, basically telling me that it can't find its DB.

I checked - the paths for Run and Debug are identical (except the .egg)


What could the problem be?

Thanks in advance
0
3 comments
Avatar
Permanently deleted user
Trace:

Environment:


Request Method: GET
Request URL: http://byteloc.com:8000/

Django Version: 1.7.1
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'ajax_search',
'SearchPage')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  98.  resolver_match = resolver.resolve(request.path_info)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
  343.             for pattern in self.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in url_patterns
  372.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in urlconf_module
  366.             self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py" in import_module
  37.     __import__(name)
File "/media/prophet/projects/SECSearch/SECSearch/urls.py" in <module>
  3. from SearchPage import views
File "/media/prophet/projects/SECSearch/SearchPage/views.py" in <module>
  10. from recoll import recoll

Exception Type: SyntaxError at /
Exception Value: cannot assign to None (recoll.py, line 178)
0
Avatar
Permanently deleted user
Figured it out...there was a duplicate file recoll.py, on in pycharm helpers, the other in stubs.
0
Avatar
Permanently deleted user
I started learning to code in Python and later Django. The first times it was hard looking at tracebacks and actually figure out what I did wrong and where the syntax error was. Some time has passed now and some way along the way.
0

Please sign in to leave a comment.