WilliamRen / django-pyodbc

Automatically exported from code.google.com/p/django-pyodbc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error was: No module named signals #52

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. copied folder 'sql_server' to C:\Python25\Lib\site-packages\sql_server
2. changed my settings.py DATABASE_ENTRY from 'sqlite3' to 'sql_server.pyodbc' 
and added 
login information as suggested by django-pyodbc project home page.
3. ran 'c:\python25\python manage.py sql'

What is the expected output? What do you see instead?
i expected to see the tables be created
the output was as follows

Z:\dev\django-gstab-pyodbc\gstab>python manage.py sql
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "C:\Python25\lib\site-packages\django\core\management\__init__.py", line 340, in 
execute_manager
    utility.execute()
  File "C:\Python25\lib\site-packages\django\core\management\__init__.py", line 295, in 
execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line 192, in 
run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line 210, in execute
    translation.activate('en-us')
  File "C:\Python25\lib\site-packages\django\utils\translation\__init__.py", line 73, in activate
    return real_activate(language)
  File "C:\Python25\lib\site-packages\django\utils\translation\__init__.py", line 43, in 
delayed_loader
    return g['real_%s' % caller](*args, **kwargs)
  File "C:\Python25\lib\site-packages\django\utils\translation\trans_real.py", line 209, in 
activate
    _active[currentThread()] = translation(language)
  File "C:\Python25\lib\site-packages\django\utils\translation\trans_real.py", line 198, in 
translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "C:\Python25\lib\site-packages\django\utils\translation\trans_real.py", line 181, in _fetch
    app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), appname[p+1:])
  File "C:\Python25\lib\site-packages\django\contrib\admin\__init__.py", line 1, in <module>
    from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
  File "C:\Python25\lib\site-packages\django\contrib\admin\options.py", line 5,in <module>
    from django.contrib.contenttypes.models import ContentType
  File "C:\Python25\lib\site-packages\django\contrib\contenttypes\models.py", line 1, in 
<module>
    from django.db import models
  File "C:\Python25\lib\site-packages\django\db\__init__.py", line 34, in <module>
    (settings.DATABASE_ENGINE, ", ".join(map(repr, available_backends)), e_user)

django.core.exceptions.ImproperlyConfigured: 'sql_server.pyodbc' isn't an 
available database 
backend. Available options are: 'dummy', 'mysql', 'oracle', 'postgr
esql', 'postgresql_psycopg2', 'sqlite3'
Error was: No module named signals

Z:\dev\django-gstab-pyodbc\gstab>

What version of the product are you using? On what operating system?
windowsXP patched latest
python 2.5
django 1.0.3
django-pyodbc from SVN link

Please provide any additional information below.

searched for my error online, i couldn't find anything helpful.
sorry for the troubles.

i also have this error on a separate windows2003 server, running django on 
iis6, i decided to test 
it on a XP virtual machine that hadn't been messed with to see if i could 
isolate the issue further.

Original issue reported on code.google.com by bendo...@gmail.com on 6 May 2009 at 7:36

GoogleCodeExporter commented 8 years ago
the MSSQL server is MSSQL 2005 Express

Original comment by bendo...@gmail.com on 6 May 2009 at 7:39

GoogleCodeExporter commented 8 years ago
SOLVED : used the correct version of django-pyodbc
svn checkout http://django-pyodbc.googlecode.com/svn/branches/django-1.0.x/ 
django-pyodbc-1.0.x
works fine now.

also just realised i missed the app name in the problem description.

thanks for all your work guys and/or girls.

Original comment by bendo...@gmail.com on 6 May 2009 at 7:52

GoogleCodeExporter commented 8 years ago
Hmm, that helped my issue as well - getting the correct version, however I'm 
now afflicted by this bug: http://code.djangoproject.com/ticket/10463 

  from django.db import models, connection
  File "/Library/Python/2.5/site-packages/django/db/__init__.py", line 57, in <module>
    'TIME_ZONE': settings.TIME_ZONE,
  File "/Users/bla/bin/django-pyodbc/sql_server/pyodbc/base.py", line 87, in __init__
    self.client = DatabaseClient()
TypeError: __init__() takes exactly 2 arguments (1 given)

Django 1.0.2
django-pyodbc-1.0.x

When I tried implementing the changes they made in the 'fix' for it I just had 
another similar error.

Original comment by malatm...@gmail.com on 6 May 2009 at 4:00

GoogleCodeExporter commented 8 years ago
hmm i see some work has been done towards my issue but maybe only in the trunk 
and not the 1.0.x? like mine 
looks more like r155 than r157... 

Original comment by malatm...@gmail.com on 6 May 2009 at 4:26

GoogleCodeExporter commented 8 years ago
malatmals:

> File "/Users/bla/bin/django-pyodbc/sql_server/pyodbc/base.py", line 87, in 
__init__
>     self.client = DatabaseClient()
> TypeError: __init__() takes exactly 2 arguments (1 given)
> 
> Django 1.0.2
> django-pyodbc-1.0.x

It seems you aren't really using django version 1.0.2 (or for the matter a 
checkout 
of the 1.0.x SVN branch) because the only place DB backends' DatabaseClient 
classes 
(and django.db.BaseDatabaseClient) have grown __init__ methods is in Django 
trunk 
(what will lead to 1.1), or perhaps your Djangfo installation is somehow 
corrupted
and is a mix between 1.0.x and trunk.

In resumen:

If you used Django                  You should use django-pyodbc

trunk                               trunk
1.0.2 release                       branches/django-1.0.x
1.0.x branch                        branches/django-1.0.x

Will close this ticket in two days.

Original comment by cra...@gmail.com on 10 May 2009 at 11:40

GoogleCodeExporter commented 8 years ago

Original comment by cra...@gmail.com on 15 May 2009 at 12:57