Xplico.org
http://forum.xplico.org/

No module named httplib2
http://forum.xplico.org/viewtopic.php?f=4&t=503
Page 1 of 1

Author:  DGlobal [ Sat Feb 25, 2012 11:11 am ]
Post subject:  No module named httplib2

Hello I had problem in web interface :
live capture --> Interface -> start
after that I got these errors:
[color=#800000]Warning (2): fopen(/opt/xplico/pol_1/realtime_start) [http://php.net/function.fopen]: failed to open stream: No such file or directory [APP/controllers/sols_controller.php, line 515]

Warning (2): fwrite() expects parameter 1 to be resource, boolean given [APP/controllers/sols_controller.php, line 516]

Warning (2): fwrite() expects parameter 1 to be resource, boolean given [APP/controllers/sols_controller.php, line 517]

Warning (2): fclose() expects parameter 1 to be resource, boolean given [APP/controllers/sols_controller.php, line 518]

Warning (2): Cannot modify header information - headers already sent by (output started at /opt/xplico/xi/cake/libs/debugger.php:683) [CORE/cake/libs/controller/controller.php, line 742]
[/color]


I use opensuse12.1 , it seems ,xplico cant' create "pol_1" (I apply chmod 777 -R /opt/xplico) , I thinks it related to session_mng.pyc script...
I installed python3-2 , but the httplib module has been renamed to http.client in Python 3.0 .

I have done these steps:
ln -s /usr/bin/python3-2 /usr/bin/python
python /opt/xplico/script/session_mng.pyc :
[color=#BF0000]Traceback (most recent call last):
File "session_mng.py", line 17, in <module>
ImportError: No module named httplib2
[/color]

again:
python -c "import http as httplib2"
python /opt/xplico/script/session_mng.pyc :
[color=#BF0000]/opt/xplico/script/session_mng.pyc: line 1: $'l\f\r': command not found
/opt/xplico/script/session_mng.pyc: line 2: $'s\254}Nc=@s\315\bdd\001lZdd\001l\001Z\001dd\001l\002Z\002dd\001l\003Z\003dd\001l\004Z\004dd\001l\005Z\005dd\001l\006Z\006dd\002l\am\bZ\b\001dd\003l': command not found
/opt/xplico/script/session_mng.pyc: line 3: Z: command not found
/opt/xplico/script/session_mng.pyc: line 4: $'\001d\004Z\vd\005Z\fd\006Z\rd\a\204Z\016d\b\204Z\017d': command not found
/opt/xplico/script/session_mng.pyc: line 5: syntax error near unexpected token `)'
/opt/xplico/script/session_mng.pyc: line 5: `kry)ejejd
d�d
�\ZZWn/ejk'
[/color]

tip: in cli mod (./xplico -m rltm -i eth0), I don't have any problem
I'm not expert in python, can you help me? thanx

Author:  gianluca.costa [ Sat Feb 25, 2012 12:35 pm ]
Post subject:  Re: No module named httplib2

Hi,
you must install binfmt-support and httplib2 for Python (3.2) and obviously Python 3.2:
For httplib2 you have two possibility:

Ciao.
Gianluca

Author:  DGlobal [ Sun Feb 26, 2012 11:29 am ]
Post subject:  Re: No module named httplib2

thanx for your help, I installed httplib2 (http://httplib2.googlecode.com/files/ht ... 7.1.tar.gz) and after importing it to python, I tested xplico again, but my problem didn't solve,
I changed "%s/script/session_mng.pyc -l %i %i" to " python %s/script/session_mng.pyc -l %i %i"
I made this change in all of files that had used this script(dema.h and sols_controller.php) , after recompile xplico.... my problem solved .

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/