Solved

python / django with mssql

Posted on 2014-02-23
8
525 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
  • 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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…
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 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 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 …

730 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