Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9207809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:28:10+00:00 2026-06-18T00:28:10+00:00

I’m trying to connect to an external SQL Server Express database using the django-pyodbc

  • 0

I’m trying to connect to an external SQL Server Express database using the django-pyodbc version at: this github link but I keep getting this error when I run manage.py shell to check if I can execute come ORM commands

Traceback (most recent call last):
File "manage.py", line 10, in <module>
  execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line   443, in execute_from_command_line
  utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
  self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
  self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",line 232, in execute
  output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",line 371, in handle
  return self.handle_noargs(**options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/shell.py", line 45, in handle_noargs
  from django.db.models.loading import get_models
File "/usr/local/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module>
  backend = load_backend(connection.settings_dict['ENGINE'])
File "/usr/local/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
  return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 93, in __getitem__
  conn = backend.DatabaseWrapper(db, alias)
File "/usr/local/lib/python2.7/site-packages/sql_server/pyodbc/base.py", line 133, in __init__
  self.ops = DatabaseOperations(self)
File "/usr/local/lib/python2.7/site-packages/sql_server/pyodbc/operations.py", line 10, in __init__
  super(DatabaseOperations, self).__init__()
  TypeError: __init__() takes exactly 2 arguments (1 given)

My settings.py has this:

DATABASES = {
    'default': {
       'ENGINE': 'sql_server.pyodbc',
       'NAME': 'DBName',
       'HOST': '192.168.29.1',
       'USER': 'user',
       'PASSWORD': 'pswd',
       'PORT': 1433,
    }
}

DATABASE_OPTIONS = {
    'driver': '/usr/local/lib/libtdsodbc.so',
    'dsn': 'FreeTDS',
    'extra_params': "TDS_VERSION=8.0"
}

I’m completely at a loss as to what I’m supposed to do, so all ideas are welcome. Essentially what I want is to be able to use a small app I’ve made to interface with the SQL Server database, while being able to use normal DJango ORM commands inplace of pyodbc connection strings (and BTW using pyodbc, I can connect to the SQL Server database without an issue)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:28:11+00:00Added an answer on June 18, 2026 at 12:28 am

    it seem to me that you are using the old repo for django-pyodbc at http://code.google.com/p/django-pyodbc/

    make sure to cleanly uninstall the old version and then reinstall

    pip uninstall sql-server.pyodbc
    pip install git+https://github.com/avidal/django-pyodbc.git
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.