Solved

python / django with mssql

Posted on 2014-02-23
8
528 Views
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
0
Comment
Question by:dgrafx
[X]
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
8 Comments
 
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 ...
0
 
LVL 25

Author Comment

by:dgrafx
ID: 39880662
is this log file re.py?

and what do i do about this?
0
 
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...
0
Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

 
LVL 25

Author Comment

by:dgrafx
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?

thanks
0
 
LVL 25

Author Comment

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

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 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 ...
0
 
LVL 25

Author Comment

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

Thanks
0
 
LVL 25

Author Closing Comment

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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Plenty of writing has gone on the web trying to compare Python with other competitive programming languages and vice versa. However, not much has been put into a wholistic perspective. This article should help you decide whether to adopt Python as a…
A set of related code is known to be a Module, it helps us to organize our code logically which is much easier for us to understand and use it. Module is an object with arbitrarily named attributes which can be used in binding and referencing. …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

707 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