I am trying to install OSQA and I thought everything was set up propertly but I get this error in my apache logs:

File "/var/osqa/mysite/forum/views/auth.py", line 17, in ? from forum.authentication import AUTH_PROVIDERS
ImportError: cannot import name AUTH_PROVIDERS

The site is running from this directory: /var/osqa/mysite

My osqa.wsgi:

sys.path.insert(0,'/var/osqa') #insert to make sure that forum will be found
sys.path.append('/var/osqa/mysite') #maybe this is not necessary
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Please let me know if you could help.

Thank you, Alex


UPDATE

I upgraded Python and everything seems to work.

asked 02 Mar '10, 02:33

alexlavr's gravatar image

alexlavr
31116
accept rate: 0%

edited 09 Mar '10, 14:08

Evgeny%20Fadeev's gravatar image

Evgeny Fadeev
1.0k51820

Thanks for the update, and I'm glad it is working now.

(10 Mar '10, 22:27) rickross ♦♦

Hello, you should not change to import *. Anyway, I've never seen that error before. What's your python version?

Does the site works, besides the error?

link

answered 02 Mar '10, 13:49

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

Thanks for getting back to me. The website loads but it gives "500 Server Error". Here is my python info: Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2

... Please let me know if you have any ideas.

(02 Mar '10, 15:19) alexlavr

P.S. I meant "500 Server Error" osqa template

(02 Mar '10, 15:20) alexlavr

Alex, possibly our usage of logging module is incompatible with what you have available on your system. I have not seen this bug before either.

(02 Mar '10, 16:05) Evgeny Fadeev

Thanks for your feedback, btw.

(02 Mar '10, 16:05) Evgeny Fadeev

just a small advice, you really should upgrade your python, 2.4.3 is a bit outdated, but I'll have to test it out. I'll fill out a bug report

(02 Mar '10, 16:40) Hernani Cerq... ♦♦

I have centos and yum was not diving me the latest python. After I read your comments, I decided to update it and installed ActivePython 2.6.4.10. Since then everything seems to work.

I only get this warning:

[Tue Mar 02 18:11:55 2010] [error] /var/osqa/mysite/forum_modules/openidauth/store.py:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead
[Tue Mar 02 18:11:55 2010] [error]   import time, base64, md5

I looked up that it could be fixed this way:

try:
    import hashlib
    md = hashlib.md5()
except ImportError:
    # for Python << 2.5
    import md5
    md = md5.new()
link

answered 02 Mar '10, 18:18

alexlavr's gravatar image

alexlavr
31116
accept rate: 0%

Thanks for the tip.

(07 Mar '10, 17:06) Hernani Cerq... ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×166
×156
×25
×1

Asked: 02 Mar '10, 02:33

Seen: 1,290 times

Last updated: 09 Mar '10, 14:08

powered by OSQA