Comments (14)
No problem.
from django-pyodbc.
I just tried for curiosity and got no problem using django-pyodbc 0.3.0 with python 3.4, Mac OSX, freetds 0.95.21, pyodbc 3.0.10 and django 1.7.10 when connecting to mssql express 2014.
First the same error in format_sql you cite above happened but setting driver_supports_utf8=True
in the database connection OPTIONS
solved it.
Strange errors like corrupted transactions or even not being able to install django-pyodbc using pip happened on ubuntu server 14.04.3 but that seems to be another story 😕
from django-pyodbc.
Christoph, I was assigned this ticket at work and on django 1.7.7, python 3.4 on ubuntu 14.04, connecting to MSSQL 2004 using django-pyodbc 0.2.6 (same stack as Adrian except I use ubuntu) I was able to get our API running with only 'driver_supports_utf8': True,'
I saw a second solution suggesting
'autocommit': True,
'unicode_results': True,
which doesn't break it but doesn't fix it without your driver_supports_utf8 suggestion. I would close this ticket with an explanation to explicitly set driver_supports_utf8=True, I don't think this is a bug
I saw gonna dive in and change your source but changing this in settings.py was sufficient
from django-pyodbc.
Any update on this?
from django-pyodbc.
The problem is still present with django 1.7.7 and python 3.4 on MacOSX, connecting to MSSQL 2004.
Using django-pyodbc 0.2.6
from django-pyodbc.
I tried the above suggestion to comment out the utf-8 encoding, and it did not solve the problem. After that change the query for the product version returns None, which breaks the code in operations.py line 67 that branches according to MSSQL version.
from django-pyodbc.
I would like to fix pyodbc package to support Python 3 and I will open PR when it's ready. Can any maintainers please prime me on what process to take as I attempt this, thank you
from django-pyodbc.
We have the test suite for django 1.4, 1.5, and 1.6. They may be old, but they exercise the codebase. Do the conversion and see what shakes out from those tests. Then, submit a pull request and we will review it.
from django-pyodbc.
Thanks mr Rogers
On Apr 12, 2016 8:58 AM, "Ross Rogers" [email protected] wrote:
We have the test suite for django 1.4, 1.5, and 1.6. They may be old, but
they exercise the codebase. Do the conversion and see what shakes out from
those tests. Then, submit a pull request and we will review it.—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#47 (comment)
from django-pyodbc.
hey, this is github, no jokes allowed :)
from django-pyodbc.
I'm struggling to get a project going. I'm new to python and django.
Is django_pyodbc supported on Python 3.5.1 and django 1.9? If not could you suggest a combination of python & django that is known to work with MS SQL Server 2012?
Here are the details: I've set up a virtual environment with windows 7 64 bit, python 3.5.1, and these packages installed:
Django (1.9)
django-pyodbc (0.4.1)
pip (8.1.2)
pyodbc (3.0.10)
pywin32 (219)
setuptools (19.1)
wheel (0.26.0)
The database definition in settings.py:
DATABASES = {
'default': {
'ENGINE': 'django_pyodbc',
'HOST': '192.168.10.47',
'PORT': '1433',
'USER': '*********',
'PASSWORD': '*******',
'NAME': 'my_db',
'OPTIONS' : {
'driver' : 'SQL Server Native Client 11.0',
'MARS_Connection' : True,
'driver_supports_utf8' : True,
},
}
}
When I try to run the development server I'm getting these errors:
(my_db) PS F:\my_db\my_db> python .\manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
DRIVER={SQL Server Native Client 11.0};SERVER=192.168.10.47;PORT=1433;UID=*****;PWD=******;DATABASE=my_db;MARS_Connection=yes
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000000004000D90>
Traceback (most recent call last):
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run
self.check_migrations()
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\commands\runserver.py", line 163, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\executor.py", line 20, in __init__
self.loader = MigrationLoader(self.connection)
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\loader.py", line 49, in __init__
self.build_graph()
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\loader.py", line 176, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\recorder.py", line 65, in applied_migrations
self.ensure_schema()
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\recorder.py", line 56, in ensure_schema
with self.connection.schema_editor() as editor:
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\backends\base\base.py", line 604, in schema_editor
'The SchemaEditorClass attribute of this database wrapper is still None')
NotImplementedError: The SchemaEditorClass attribute of this database wrapper is still None
from django-pyodbc.
Similar setup (not same) as @devanroberts here. Same error as his (NotImplementedError....).
from django-pyodbc.
Major +1
from django-pyodbc.
Dear All,
I am using django-pyodbc-azure 2.1.0.0 (https://pypi.org/project/django-pyodbc-azure/) which is a modern fork of django-pyodbc, a Django Microsoft SQL Server external DB backend that uses ODBC by employing the pyodbc library. It supports Microsoft SQL Server and Azure SQL Database.
from django-pyodbc.
Related Issues (20)
- aggregate_select() removed in Django 1.10 HOT 2
- OpenEdge support not working in master. Some basic fixes here
- django.core.exceptions.ImproperlyConfigured: Django 1.11 is not supported. HOT 4
- as_sql() got an unexpected keyword argument 'subquery' HOT 5
- Please update for Django 1.11.1 HOT 5
- Conversion failed when converting date and/or time from character string. HOT 2
- pyodbc.DataError: Conversion failed when converting da te and/or time from character string HOT 1
- SchemaEditor error HOT 1
- unixODBC config files HOT 1
- Using for dbf files HOT 1
- Django 2.0 Alpha inspectdb command fails
- django-pyodbc query with OFFSET+LIMIT issue
- Active maintainer needed HOT 9
- No default encoding (2.0.0a1) HOT 3
- Error: SchemaEditorClass HOT 1
- Different schemas in models.py HOT 1
- django odbc connection to production SQL server 2014 from windows machine HOT 1
- Help in setting up connection with load balancer HOT 1
- Sql server 2019 connection string issue from django project HOT 1
- Database error conection using django-pyodbc to connect to SQL Server 2019 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-pyodbc.