[indivohealth] ImproperlyConfigured: Error importing middleware indivo_server.indivo.middlewares.authentication: "cannot import name HTTPRequest

16 views
Skip to first unread message

Vijay Kannan

unread,
Jan 18, 2016, 8:26:36 AM1/18/16
to indivohealth
Dear Folks,

I am building proof of concept with Indivohealth on ubuntu 14.10. I have installed both server and UI with Mysql.

http://indivo.smartrx.in:8002  -- UI server url 

http://indivo.smartrx.in:8001  -- Indivo server url [ This shows internal server error and given below were the logs]

[Mon Jan 18 12:48:23.888096 2016] [:error] [pid 28663] [client 54.251.170.124:39138] mod_wsgi (pid=28663): Exception occurred processing WSGI script '/var/www/html/sample/indivo_server/django.wsgi'.
[Mon Jan 18 12:48:23.888199 2016] [:error] [pid 28663] [client 54.251.170.124:39138] Traceback (most recent call last):
[Mon Jan 18 12:48:23.888253 2016] [:error] [pid 28663] [client 54.251.170.124:39138]   File "/var/www/html/sample/indivo_server/django.wsgi", line 40, in __call__
[Mon Jan 18 12:48:23.888399 2016] [:error] [pid 28663] [client 54.251.170.124:39138]     return self.application(environ, _start_response)
[Mon Jan 18 12:48:23.888435 2016] [:error] [pid 28663] [client 54.251.170.124:39138]   File "/var/www/html/sample/indivo_env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 219, in __call__
[Mon Jan 18 12:48:23.888631 2016] [:error] [pid 28663] [client 54.251.170.124:39138]     self.load_middleware()
[Mon Jan 18 12:48:23.888673 2016] [:error] [pid 28663] [client 54.251.170.124:39138]   File "/var/www/html/sample/indivo_env/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware
[Mon Jan 18 12:48:23.888950 2016] [:error] [pid 28663] [client 54.251.170.124:39138]     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Mon Jan 18 12:48:23.888998 2016] [:error] [pid 28663] [client 54.251.170.124:39138] ImproperlyConfigured: Error importing middleware indivo_server.indivo.middlewares.authentication: "cannot import name HTTPRequest"
 
Indivo_server - settings.py ->> 

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'indivo_server.indivo.middlewares.authentication.Authentication',
    'indivo_server.indivo.middlewares.paramloader.ParamLoader',
    'indivo_server.indivo.middlewares.authorization.Authorization',
    'indivo_server.indivo.middlewares.audit.AuditWrapper'
)

I have folder indivo i.e. /var/www/html/sample/indivo_server/indivo which holds all the middlewares and other folders.

Issues I am trying to solve:

1. Not able to login on UI server with john...@example.org / jsmith / password.example 
2. Indivo server issue

I have spent more than 3 days to setup and one day on this issue please help me to fix these .

Highly appreciated your help.

Prasad NIFT

unread,
Apr 25, 2020, 10:22:59 AM4/25/20
to indivohealth
* External Email - Caution *

Hi Vijay: were you able to solve this.i am getting the same issue.

thanks

sudhakaran packianathan

unread,
May 3, 2020, 3:02:23 PM5/3/20
to indivohealth
* External Email - Caution *

Instead of using Indivo through the client UI, you can try accessing Indivo from an external REST API client where you can send oauth 1.0a signed token. By this way you can access all the API. You should be able to this from a combination of SoapUI / Groovy.
Reply all
Reply to author
Forward
0 new messages