View unanswered posts | View active topics It is currently Fri Aug 18, 2017 8:45 am



Post new topic Reply to topic  [ 3 posts ] 
 No module named httplib2 
Author Message

Joined: Wed Dec 08, 2010 6:02 am
Posts: 6
Reply with quote
Post 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


Sat Feb 25, 2012 11:11 am
Profile
Site Admin

Joined: Wed Sep 16, 2009 10:09 pm
Posts: 394
Reply with quote
Post 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


Sat Feb 25, 2012 12:35 pm
Profile WWW

Joined: Wed Dec 08, 2010 6:02 am
Posts: 6
Reply with quote
Post 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 .


Sun Feb 26, 2012 11:29 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.