Hi all, I'm a bit new to Hyperdex and using the Python client to connect to our instance. I'm trying to make our space description exist in a separate file so others unfamiliar with python code can make changes to it. I wonder, however, whether this is possible, or if I must put the space description in the python code itself.
Here's a few lines of the python code:
f_schema = open("schema/schema.txt")
# First create a new space, deleting space with the same name in existence
a = hyperdex.admin.Admin(hostname, port)
c = hyperdex.client.Client(hostname, port)
try:
a.rm_space(space_name)
except hyperdex.admin.HyperDexAdminException as e:
print("Space not found, creating fresh")
space_info = ''''''
for line in f_schema:
space_info += line
print("Adding space, info below: \n" + space_info)
a.add_space(space_info)
Every time I try to run this, I get this exception thrown:
HyperDexAdminException(HYPERDEX_ADMIN_BADSPACE, Bad space description)
Should I be looking at my schema file for errors? Or have I done something impermissible in my code itself?
Thanks!