Installation issue. "ImportError: No module named dateutil StdOut: StdErr:"

2,221 views
Skip to first unread message

Bruno Carozza

unread,
Mar 11, 2015, 7:40:56 AM3/11/15
to qat...@googlegroups.com
Hi, 


After completing all the steps, i launch http://localhost and get this traceback in the browser:

Error occurred: Traceback (most recent call last): File "c:\Python27\Scripts\wfastcgi.py", line 736, in main result = handler(record.params, response.start) File "C:\deploy\venvs\qatrack\lib\site-packages\django\core\handlers\wsgi.py", line 241, in __call__ response = self.get_response(request) File "C:\deploy\venvs\qatrack\lib\site-packages\django\core\handlers\base.py", line 177, in get_response response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) File "C:\deploy\venvs\qatrack\lib\site-packages\django\core\handlers\base.py", line 222, in handle_uncaught_exception if resolver.urlconf_module is None: File "C:\deploy\venvs\qatrack\lib\site-packages\django\core\urlresolvers.py", line 342, in urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "C:\deploy\venvs\qatrack\lib\site-packages\django\utils\importlib.py", line 35, in import_module __import__(name) File ".\qatrack\urls.py", line 13, in url(r'^qa/', include('qatrack.qa.urls')), File "C:\deploy\venvs\qatrack\lib\site-packages\django\conf\urls\__init__.py", line 24, in include urlconf_module = import_module(urlconf_module) File "C:\deploy\venvs\qatrack\lib\site-packages\django\utils\importlib.py", line 35, in import_module __import__(name) File ".\qatrack\qa\urls.py", line 2, in from views import base, perform, review, charts, backup, admin, forms File ".\qatrack\qa\views\perform.py", line 9, in import dateutil ImportError: No module named dateutil StdOut: StdErr:




I run pip install python-dateutil which returns "Requirement already satisfied...".

in git bash, if i type "python" then "import dateutil" then "help(dateutil)", i get 

NAME
    dateutil
- # -*- coding: utf-8 -*-


FILE
    c
:\deploy\venvs\qatrack\lib\site-packages\python_dateutil-2.4.1-py2.7.egg\da
teutil
\__init__.py


PACKAGE CONTENTS
    easter
    parser
    relativedelta
    rrule
    tz
    tzwin
    zoneinfo
(package)


DATA
    __loader__
= <zipimporter object "c:\deploy\venvs\qatrack\lib\site-pac...
    __version__ = '2.4.1'


VERSION
    2.4.1


Any suggestion?

Thanks

Bruno




Randle Taylor

unread,
Mar 11, 2015, 8:30:38 AM3/11/15
to Bruno Carozza, qat...@googlegroups.com
HI Bruno,

If you just run python (from your virtualenv) and try to "import dateutil" do you get a similar error?  It may be that the dateutil install got corrupted.  You could try "pip uninstall python-dateutil" then "pip install python-dateutil==1.5" and see if that resolves the issue.

RT

On 11 March 2015 at 07:40, Bruno Carozza <bruno....@gmail.com> wrote:
Hi, 


After completing all the steps, i launch http://localhost and get this traceback in the browser:

Error occurred: Traceback (most recent call last): File "c:\Python27\Scripts\wfastcgi.py", line 736, in main result = handler(record.params, response.start) File "C:\deploy\venvs\qatrack\lib\site-packages\django\core\handlers\wsgi.py", line 241, in __call__ response = self.get_response(request) File "C:\deploy\venvs\qatrack\lib\site-packages\django\core\handlers\base.py", line 177, in get_response response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) File "C:\deploy\venvs\qatrack\lib\site-packages\django\core\handlers\base.py", line 222, in handle_uncaught_exception if resolver.urlconf_module is None: File "C:\deploy\venvs\qatrack\lib\site-packages\django\core\urlresolvers.py", line 342, in urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "C:\deploy\venvs\qatrack\lib\site-packages\django\utils\importlib.py", line 35, in import_module __import__(name) File ".\qatrack\urls.py", line 13, in url(r'^qa/', include('qatrack.qa.urls')), File "C:\deploy\venvs\qatrack\lib\site-packages\django\conf\urls\__init__.py", line 24, in include urlconf_module = import_module(urlconf_module) File "C:\deploy\venvs\qatrack\lib\site-packages\django\utils\importlib.py", line 35, in import_module __import__(name) File ".\qatrack\qa\urls.py", line 2, in from views import base, perform, review, charts, backup, admin, forms File ".\qatrack\qa\views\perform.py", line 9, in import dateutil ImportError: No module named dateutil StdOut: StdErr: 


I run pip install python-dateutil which returns "Requirement already satisfied...".

Any suggestion?

Thanks

Bruno




--
You received this message because you are subscribed to the Google Groups "QATrack+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qatrack+u...@googlegroups.com.
To post to this group, send email to qat...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted

Bruno Carozza

unread,
Mar 11, 2015, 8:56:32 AM3/11/15
to qat...@googlegroups.com
When i run "import dateutil" in python it executes without error.

I noticed i only had the *.egg file in the C:\deploy\venvs\qatrack\Lib\site-packages directory. There were no directory named DateUtil. So i renamed the python_dateutil-2.4.1-py2.7.egg file to python_dateutil-2.4.1-py2.7.zip and extracted the dateutil folder in the site-packages folder. 

Now, when i run localhost, i get to the main qatrack page with: "We're sorry but a server error has occurred. We've been notified and will look into it as soon as possible."

See the attached screenshot.

Any suggestion?

Thanks Randle
SS_QaTrack_InstallIssue.png

Randle Taylor

unread,
Mar 11, 2015, 9:03:21 AM3/11/15
to qat...@googlegroups.com
If you set DEBUG=True in your local_settings.py file you will be able to see the full traceback which should allow easier debugging.  I notice that pyton-dateutil is showing as v1.4...Off the top of my head, I can't remember if it's critical or not but you should probably update to a newer version of dateutil   "pip install python-dateutil==2.2" (the QATrack+ requirements state v1.5+ but I've been using 2.2 on my local install without issues).

RT

On 11 March 2015 at 08:56, Bruno Carozza <bruno....@gmail.com> wrote:
When i run "import dateutil" in python it executes without error.

I noticed i only had the *.egg file in the C:\deploy\venvs\qatrack\Lib\site-packages directory. There were no directory named DateUtil. So i renamed the python_dateutil-2.4.1-py2.7.egg file to python_dateutil-2.4.1-py2.7.zip and extracted the dateutil folder in the site-packages folder. 

When i run localhost, i get to the main qatrack page with: "We're sorry but a server error has occurred. We've been notified and will look into it as soon as possible."

See the attached screenshot.

Any suggestion?

Thanks Randle

Bruno Carozza

unread,
Mar 11, 2015, 9:15:13 AM3/11/15
to qat...@googlegroups.com
With Debug = true, i get "Error importing authentication backend qatrack.accounts.backends.WindowsIntegratedAuthenticationBackend: "No module named _ldap""

See the attached file for screenshot.

I did not skip this step: Install python-ldap from: https://pypi.python.org/pypi/python-ldap/. Copy the 'ldap' folder from C:\Python27\Lib\site-packages\ into C:\deploy\venvs\qatrack\Lib\site-packages\"
I'm using python-ldap-2.4.19.win32-py2.7.exe

Thanks again!
SS_QaTrack_InstallIssue_ldap.png

Randle Taylor

unread,
Mar 11, 2015, 9:20:17 AM3/11/15
to qat...@googlegroups.com
Looks like you maybe missed the LDAP install step from the instructions?


"Install python-ldap from: https://pypi.python.org/pypi/python-ldap/. Copy the 'ldap' folder from C:\Python27\Lib\site-packages\ into C:\deploy\venvs\qatrack\Lib\site-packages\"

Hopefully that's all it is :)

RT

On 11 March 2015 at 09:15, Bruno Carozza <bruno....@gmail.com> wrote:
With Debug = true, i get "Error importing authentication backend qatrack.accounts.backends.WindowsIntegratedAuthenticationBackend: "No module named _ldap""

See the attached file for screenshot.

Thanks again!


On Wednesday, March 11, 2015 at 7:40:56 AM UTC-4, Bruno Carozza wrote:

Bruno Carozza

unread,
Mar 11, 2015, 9:31:20 AM3/11/15
to qat...@googlegroups.com
I did actually do that!

I ended up with an ldap folder in C:\deploy\venvs\qatrack\Lib\site-packages.

funny thing is if i rename the folder to "_ldap" i get almost the same error "No module named LDAP"" instead of "_LDAP"

if i duplicate the folder "LDAP" and rename the copy "_LDAP", now i have 2 identical folder, the error returned by the browser is different....

"unhashable type: 'dict'"


SS_QaTrack_InstallIssue_ldap2.png

Randle Taylor

unread,
Mar 11, 2015, 9:48:00 AM3/11/15
to qat...@googlegroups.com
Hmmm...It looks like the folder layout of python-ldap has changed now (v2.4.19) since those instructions were written (v2.4.10) and it now dumps some things in the main site-packages directory in addition to the site-packages/ldap directory.   You can either copy those extra files to your venv site-packages (and undo any renaming you've done):

 c:\python27\lib\site-packages\_ldap.pyd
 c:\python27\lib\site-packages\dsml.py
 c:\python27\lib\site-packages\dsml.pyc
 c:\python27\lib\site-packages\dsml.pyo

and you may be in business.  Or you could uninstall ldap (pip uninstall python-ldap) and remove those files and any other ldap folders you've created, then grab the 2.4.10 installer from https://pypi.python.org/pypi/python-ldap/2.4.10 and follow the original instructions.

RT


Bruno Carozza

unread,
Mar 11, 2015, 10:03:26 AM3/11/15
to qat...@googlegroups.com
I did uninstall and reinstalled the older version of the ldap module and the issue is solved! 

SSO is now working!

Thanks again Randle! Very efficient.

Bruno

pdes...@gmail.com

unread,
Apr 30, 2015, 2:32:36 PM4/30/15
to qat...@googlegroups.com
Hi Bruno,

did you succeed in setting up Active Directory auth for qatrack+?

Philippe

pdes...@gmail.com

unread,
May 6, 2015, 9:28:12 AM5/6/15
to qat...@googlegroups.com, randle...@gmail.com, pdes...@gmail.com
For the record, I had to add
TLS_REQCERT allow

in my /etc/openldap/ldap.conf in order to talk with my AD server on secure port 686. Otherwise, the self-signed SSL certificate was rejected early in the LDAP transaction.
Reply all
Reply to author
Forward
0 new messages