- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: error importing cgi module in Python on HP-XU
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-27-2010 03:12 PM
тАО12-27-2010 03:12 PM
error importing cgi module in Python on HP-XU
>>>import cgi
I get the following error.
ImportError: Failed to load /opt/iexpress/python/lib/python2.7/lib-dynload/binascii.sl
Also, when running a cgi script that does the same import this error also appears in the log for Apache. Is there a patch or fix for this?
Thanks,
Bill Allen
- Tags:
- Python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-27-2010 09:12 PM
тАО12-27-2010 09:12 PM
Re: error importing cgi module in Python on HP-XU
uname -a
file /opt/iexpress/python/lib/python2.7/lib-dynload/binascii.sl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2010 09:14 AM
тАО12-28-2010 09:14 AM
Re: error importing cgi module in Python on HP-XU
HP-UX fcdshp03 B.11.23 U 9000/800 1122901597 unlimited-user license
Running file against that particular file yields:
/opt/iexpress/python/lib/python2.7/lib-dynload/binascii.sl: cannot open
Essentially, this is what Python is telling me also, which make me think this file is corrupt in the depot. I have downloaded the depot again and made another attempt with the same results, so I do not think it is corruption from the download process but at the source. I could be wrong, any thoughts?
--Bill Allen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2010 08:14 PM
тАО12-28-2010 08:14 PM
Re: error importing cgi module in Python on HP-XU
>this is what Python is telling me also,
No, this tells you the file isn't there, rather than it is the wrong type or corrupted.
>I do not think it is corruption from the download process but at the source.
Right, it just isn't there. Have you tried searching for it?
find /opt/iexpress -name binascii.sl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-29-2010 07:57 AM
тАО12-29-2010 07:57 AM
Re: error importing cgi module in Python on HP-XU
find /opt/iexpress -name binascii.sl
/opt/iexpress/python/lib/python2.7/lib-dynload/binascii.sl
Here is a little more information, the full traceback. It still appears to me the problem is with the file itself.
Traceback (most recent call last):
File "
File "/opt/iexpress/python/lib/python2.7/cgi.py", line 51, in
import mimetools
File "/opt/iexpress/python/lib/python2.7/mimetools.py", line 6, in
import tempfile
File "/opt/iexpress/python/lib/python2.7/tempfile.py", line 34, in
from random import Random as _Random
File "/opt/iexpress/python/lib/python2.7/random.py", line 48, in
from binascii import hexlify as _hexlify
ImportError: Failed to load /opt/iexpress/python/lib/python2.7/lib-dynload/binascii.sl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-29-2010 11:32 AM
тАО12-29-2010 11:32 AM
Re: error importing cgi module in Python on HP-XU
>I did search and the file is present.
These seem contradictory. You need to check the permissions of each directory path and the file itself to make sure they all have at least r-xr-xr-x:
ll -d /opt /opt/iexpress /opt/iexpress/python /opt/iexpress/python/lib /opt/iexpress/python/lib/python2.7 /opt/iexpress/python/lib/python2.7/lib-dynload /opt/iexpress/python/lib/python2.7/lib-dynload/binascii.sl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-29-2010 12:02 PM
тАО12-29-2010 12:02 PM