TypeError with MS SQL Server and django-pyodbc-azure

Issue #83 resolved
Diego Jancic created an issue

I'm new to python, but when trying to install Postman for the first time, using django-pyodbc, I received the following error (full log attached):

Exception Value:    
super(type, obj): obj must be an instance or subtype of type
Exception Location: C:\Projects\OnlineCommunities\env\lib\site-packages\sql_server\pyodbc\compiler.py in compile, line 213

The solution I found was to change the class Proxy in file query.py, from this:

class Proxy(object):

to this:

from django.db.models.sql.compiler import SQLCompiler
class Proxy(SQLCompiler):

Comments (5)

  1. Patrick Samson repo owner
    • changed status to open

    I confirm the issue, in relation with a MS SQL Server backend. Analysis is in progress.

  2. Patrick Samson repo owner

    Instead of your solution, please try this one: class CompilerProxy(Proxy, SQLCompiler):, and confirm that it works as well.

  3. Log in to comment