Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


python / django with mssql

Posted on 2014-02-23
Medium Priority
Last Modified: 2014-02-25
i'm getting errors setting up a ms sql db

Python 3.3 & Django 1.7 on Windows 7 Pro & Ms Sql 2008

this is my starting point: http://django-mssql.readthedocs.org/en/latest/ 

first i pip install django-mssql

see attached image for error
error details
Question by:dgrafx
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39880653
the message indicates that the failure is logged into a pip.log file, which you should check for further details ...
LVL 25

Author Comment

ID: 39880662
is this log file re.py?

and what do i do about this?
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39880678
I found this explanation:  
 ... because of the following code from line 7 of setup.py in the traceback:

version = re.search('__version__ = "(.+?)"', f.read()).group(1)

This should work if the search pattern was a bytes object. A byte literal can be created by simply pre-pending the string literal with a b like the following:

version = re.search(b'__version__ = "(.+?)"', f.read()).group(1) 

Open in new window

not sure if that will solve your case, but it looks like it's the same issue: the package is not correctly tested, visibly...
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

LVL 25

Author Comment

ID: 39880701
here are the lines of code:

158: def search(pattern, string, flags=0):
159: """Scan through string looking for a match to the pattern, returning
160: a match object, or None if no match was found."""
161: return _compile(pattern, flags).search(string)

what are the edits you are suggesting?

LVL 25

Author Comment

ID: 39882647
or if not suggesting edits are you saying forget it?
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 2000 total points
ID: 39882760
I am not strong in phython at all, I may only be a "reader" of source code.
from what I have read so far, instead of b' .... '  you may want to use str( ... ) instead, especially if you are working with a variable.
hope it helps, otherwise you may want to use an older package ...
LVL 25

Author Comment

ID: 39887462
So I discovered that the newest version of Python that works with the unofficial django-mssql is 2.7

LVL 25

Author Closing Comment

ID: 39887463
using an older version of Python was the solution

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing Python 2.7.3 version on Windows operating system For installing Python first we need to download Python's latest version from URL" www.python.org " You can also get information on Python scripting language from the above mentioned we…
Strings in Python are the set of characters that, once defined, cannot be changed by any other method like replace. Even if we use the replace method it still does not modify the original string that we use, but just copies the string and then modif…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question