I'm working on a python plugin for nbdkit that treats Google Cloud
Storage as a block device. I have a library, gcs.py, that implements
simple commands: list, get, put, delete; source is here:
https://github.com/wspeirs/cldblkdev/blob/master/gcs.py
When I attempt to run nbdkit I get the following error:
nbdkit python script=/home/wspeirs/src/cldblkdev/cldblkdev.py
Traceback (most recent call last):
File "/home/wspeirs/src/cldblkdev/cldblkdev.py", line 5, in <module>
import gcs
File "/home/wspeirs/src/cldblkdev/gcs.py", line 2, in <module>
import httplib2
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py",
line 930, in <module>
class HTTPSConnectionWithTimeout(httplib.HTTPSConnection):
AttributeError: 'module' object has no attribute 'HTTPSConnection'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line
63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 5, in
<module>
from apport.report import Report
File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in
<module>
from xml.parsers.expat import ExpatError
File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so:
undefined symbol: _Py_ZeroStruct
Original exception was:
Traceback (most recent call last):
File "/home/wspeirs/src/cldblkdev/cldblkdev.py", line 5, in <module>
import gcs
File "/home/wspeirs/src/cldblkdev/gcs.py", line 2, in <module>
import httplib2
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py",
line 930, in <module>
class HTTPSConnectionWithTimeout(httplib.HTTPSConnection):
AttributeError: 'module' object has no attribute 'HTTPSConnection'
nbdkit: error: /home/wspeirs/src/cldblkdev/cldblkdev.py: error running
this script
Everything seems to work outside of nbdkit. I'm assuming this is some
path related issue... any thoughts on how to fix this?
Thanks...
Bill-