My python script runs just fine on the Apache server locally set up on my computer, however, on importing the json2html library I am getting an internal server error
The moment I comment the import statement out , it seems to work. I even tried importing just the functions from the library , thinking maybe it is a space constraint or so.
#!/usr/bin/python
import cgi,cgitb
#import json2html#this has the errir
import cassandra
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
Internal Server Error
From logs:
ImportError: No module named json2html
[Tue Jun 11 15:42:52.495135 2019] [cgid:error] [pid 2235:tid 140698967865088] [client 127.0.0.1:35474] End of script output before headers: show.py, referer: http://test.com/
Traceback (most recent call last):
File "/home/arjun/Cassandra/website_test/show.py", line 6, in
from json2html import *
The module works fine on my system and dosen't give any errors,but it seems to have a problem when running on the server.
Can somebody help fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…