Error: No module named provider.oauth2

929 views
Skip to first unread message

Alex Valero

unread,
Nov 13, 2014, 6:24:23 AM11/13/14
to edx-...@googlegroups.com
Hello all,

I followed the installation guide at https://github.com/edx/configuration/wiki/edX-Developer-Stack and I had no problem with the installation of the developer stack. But at the point "Using the edX devstack" the errors started appearing with the command "paver devstack lms".
First, I had error with djfs and i modified the aws.py files at lms and cms but now i'ḿ getting the next error:

edxapp@precise64:~/edx-platform$ paver devstack lms
---> pavelib.servers.devstack
---> pavelib.prereqs.install_prereqs
---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py lms --settings=devstack preprocess_assets
Error: No module named provider.oauth2


Captured Task Output:
---------------------

---> pavelib.servers.devstack
---> pavelib.prereqs.install_prereqs
---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py lms --settings=devstack preprocess_assets

Build failed running pavelib.servers.devstack: Subprocess return code: 1

I keep having this error even after installing oauth2, any ideas about how to fix this?

Thanks

Alex.

Carlos Andrés Rocha

unread,
Nov 13, 2014, 12:20:04 PM11/13/14
to edx-...@googlegroups.com
Hi Alex,

The module provider.oauth2 is part of the django-oauth2-provider python package. I recommend that you try the following:

- paver install_prereqs

If that doesn't work, then try 

- pip install -r requirements/edx/github.txt

The version of django-oauth2-provider we use in the platform is slightly customized. You can find it here: 


--
Carlos Andrés Rocha
www.edx.org

Alex Valero

unread,
Nov 14, 2014, 6:14:09 AM11/14/14
to edx-...@googlegroups.com

Thanks for your help Carlos.
The command pip install -r requirements/edx/github.txt has solved my problem. The server is running but it doesn't work properly, when I try to access it in my browser at
http://localhost:8000/  I get this error>


ConnectionFailure at /

could not connect to localhost:27017: [Errno 111] Connection refused
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.4.16
Exception Type: ConnectionFailure
Exception Value:
could not connect to localhost:27017: [Errno 111] Connection refused
Exception Location: /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py in __init__, line 274
Python Executable: /edx/app/edxapp/venvs/edxapp/bin/python
Python Version: 2.7.3
Python Path:
['.',
 '.',
 '/edx/app/edxapp/edx-platform',
 '/edx/app/edxapp/venvs/edxapp/src/djpyfs',
 '/edx/app/edxapp/venvs/edxapp/src/django-staticfiles',
 '/edx/app/edxapp/venvs/edxapp/src/django-pipeline',
 '/edx/app/edxapp/venvs/edxapp/src/django-wiki',
 '/edx/app/edxapp/venvs/edxapp/src/lettuce',
 '/edx/app/edxapp/venvs/edxapp/src/pystache-custom',
 '/edx/app/edxapp/venvs/edxapp/src/zendesk',
 '/edx/app/edxapp/venvs/edxapp/src/django-ipware',
 '/edx/app/edxapp/venvs/edxapp/src/pygeoip',
 '/edx/app/edxapp/venvs/edxapp/src/edx-jsme',
 '/edx/app/edxapp/venvs/edxapp/src/xblock',
 '/edx/app/edxapp/venvs/edxapp/src/codejail',
 '/edx/app/edxapp/venvs/edxapp/src/diff-cover',
 '/edx/app/edxapp/venvs/edxapp/src/js-test-tool',
 '/edx/app/edxapp/venvs/edxapp/src/django-waffle',
 '/edx/app/edxapp/venvs/edxapp/src/event-tracking',
 '/edx/app/edxapp/venvs/edxapp/src/edx-analytics-data-api-client',
 '/edx/app/edxapp/venvs/edxapp/src/bok-choy',
 '/edx/app/edxapp/venvs/edxapp/src/django-splash',
 '/edx/app/edxapp/venvs/edxapp/src/acid-xblock',
 '/edx/app/edxapp/venvs/edxapp/src/edx-ora2',
 '/edx/app/edxapp/venvs/edxapp/src/opaque-keys',
 '/edx/app/edxapp/venvs/edxapp/src/ease',
 '/edx/app/edxapp/venvs/edxapp/src/i18n-tools',
 '/edx/app/edxapp/edx-platform/common/lib/calc',
 '/edx/app/edxapp/edx-platform/common/lib/capa',
 '/edx/app/edxapp/edx-platform/common/lib/chem',
 '/edx/app/edxapp/edx-platform/common/lib/sandbox-packages',
 '/edx/app/edxapp/edx-platform/common/lib/symmath',
 '/edx/app/edxapp/edx-platform/common/lib/xmodule',
 '/edx/app/edxapp/edx-platform/common/lib/dogstats',
 '/edx/app/edxapp/edx-platform/common/lib/safe_lxml',
 '/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/Open_edX-0.1-py2.7.egg',
 '/edx/app/edxapp/venvs/edxapp/src/django-oauth2-provider',
 '/edx/app/edxapp/venvs/edxapp/src/oauth2-provider',
 '/edx/app/edxapp/venvs/edxapp/src/edx-val',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/Open_edX-0.1-py2.7.egg',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/plat-linux2',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/lib-tk',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/lib-old',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages',
 '/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/newrelic-2.18.1.15',
 path(u'/edx/app/edxapp/edx-platform'),
 path(u'/edx/app/edxapp/edx-platform/lms/djangoapps'),
 path(u'/edx/app/edxapp/edx-platform/common/djangoapps'),
 path(u'/edx/app/edxapp/edx-platform/common/lib')]

It seems like django is still giving problems, how can i fix this?
Thank you



Alex.

Hiranya Kashipu

unread,
Nov 14, 2014, 6:44:46 AM11/14/14
to edx-...@googlegroups.com
On 14 November 2014 16:44, Alex Valero <alex...@gmail.com> wrote:
>
[...]
>> ConnectionFailure at /
>>
>> could not connect to localhost:27017: [Errno 111] Connection refused
>>
>> Request Method: GET
>> Request URL: http://localhost:8000/
>> Django Version: 1.4.16
>> Exception Type: ConnectionFailure
>> Exception Value:
>>
>> could not connect to localhost:27017: [Errno 111] Connection refused

MongoDB is not running. This may fix it.

sudo rm /edx/var/mongo/mongodb/mongod.lock
sudo mongod -repair --config /etc/mongodb.conf
sudo chown -R mongodb:mongodb /edx/var/mongo/mongodb/.
sudo start mongodb

More here: https://github.com/edx/configuration/wiki/edX-Developer-Stack

Alex Valero

unread,
Nov 14, 2014, 6:55:28 AM11/14/14
to edx-...@googlegroups.com
Yes it worked! I have it running and reachable, thank you for your help.
Reply all
Reply to author
Forward
0 new messages