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

Error was: cannot import name BaseDatabaseClient #4

Closed
dkdndes opened this issue Oct 17, 2015 · 3 comments
Closed

Error was: cannot import name BaseDatabaseClient #4

dkdndes opened this issue Oct 17, 2015 · 3 comments

Comments

@dkdndes
Copy link

dkdndes commented Oct 17, 2015

goblin:dbanywhere $ source dbanwhere17/.../sa_config.sh

goblin:dbanywhere $ python manage.py migrate

[...]
django.core.exceptions.ImproperlyConfigured: 'sqlany_django' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
    u'base', u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3'
Error was: cannot import name BaseDatabaseClient

goblin:dbanywhere $ more test_sqlany.py

  import sqlanydb
  conn = sqlanydb.connect(uid='dba', pwd='sql123', eng='django', dbn='django')
  curs = conn.cursor()
  curs.execute("select 'Hello, world!'")
  print "SQL Anywhere says: %s" % curs.fetchone()
  curs.close()
  conn.close()

goblin:dbanywhere $ python test_sqlany.py

  SQL Anywhere says: Hello, world!

I use Django 1.8.5, the test file works just fine.
Please, advice.

@dkdndes
Copy link
Author

dkdndes commented Oct 17, 2015

Hi,

just saw in sqlany-django the following comment:

gperrow-SAP commented 2 days ago
Django 1.8.x is not supported by the SQL Anywhere driver. I will investigate adding support.

If I uninstall django 1.8.2 and install django 1.7 the configuration generates a different error:

   File     "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
 __import__(name)
ImportError: No module named security

I use a plain empty django project and have not added any modules, yet.

@gperrow-SAP
Copy link
Contributor

I'm afraid I don't know what the problem is. Can you post the entire error message so we can tell who's trying to load the security module? There is no security module in the sqlany-django driver, nor do we try to import one.

If this is a problem with the sqlany-django driver, you should post the issue in that project: https://github.com/sqlanywhere/sqlany-django

@dkdndes
Copy link
Author

dkdndes commented Nov 1, 2015

I opened a new issue in the other repository and close this one. Please, have a look at #9

@dkdndes dkdndes closed this as completed Nov 1, 2015
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

2 participants