threefoldtecharchive / jumpscaleX_core

Apache License 2.0
1 stars 6 forks source link

Attempt to write a readonly database when trying to use registry client #484

Closed john-kheir closed 4 years ago

john-kheir commented 4 years ago

Steps to reproduce

1- Run this tests from kosmos /sandbox/lib/jumpscale/Jumpscale/clients/tfgrid_registry/tests/tests_tfgrid_registry.py.test001_RegisterationAndPrivacy

2- Close and open kosmos

3- Then run the test again, you will get the following error

==============================================================================================================================
ERROR: /sandbox/lib/jumpscale/Jumpscale/clients/tfgrid_registry/tests/tests_tfgrid_registry.py.test001_RegisterationAndPrivacy
------------------------------------------------------------------------------------------------------------------------------
EXCEPTION: 
    OperationalError('attempt to write a readonly database',)
--TRACEBACK------------------
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/TestTools.py in _execute_test
    189    test()
/sandbox/lib/jumpscale/Jumpscale/clients/tfgrid_registry/tests/tests_tfgrid_registry.py in test001_RegisterationAndPrivacy
    119    schema=schema, authors=[author.tid], model=model, is_encrypted_data=False, country_code=country_code
/sandbox/lib/jumpscale/Jumpscale/clients/tfgrid_registry/TFGridRegistryClient.py in register
    129    description=description,
/sandbox/lib/jumpscale/Jumpscale/clients/tfgrid_registry/TFGridRegistryClient.py in __add_registry_schema_data
    265    dataobj.save()
/sandbox/lib/jumpscale/Jumpscale/data/schema/JSXObjectRoot.py in save
    96    obj = self._model.set(self)
/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBDecorator.py in wrapper_queue_method
    55    return func(*args, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBModel.py in set
    385    self.index.set(obj)
/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBModelIndex.py in set
    81    self._sql_index_set(obj)
/sandbox/var/codegen/bcdbindex_tfgrid_registry_entry_data_1_a8d2a94c9aa4cd73fa2672608afdcd60.py in _sql_index_set
    66    self.sql.create(**dd)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in create
    6202    inst.save(force_insert=True)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in save
    6385    pk = self.insert(**field_dict).execute()
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in inner
    1856    return method(self, database, *args, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in execute
    1930    return self._execute(database)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in _execute
    2653    return super(Insert, self)._execute(database)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in _execute
    2402    cursor = database.execute(self)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in execute
    3082    return self.execute_sql(sql, params, commit=commit)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in execute_sql
    3076    self.commit()
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in __exit__
    2831    reraise(new_type, new_type(*exc_args), traceback)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in reraise
    196    raise value.with_traceback(tb)
/sandbox/lib/jumpscale/Jumpscale/clients/peewee/peewee.py in execute_sql
    3069    cursor.execute(sql, params or ())
-----------------------------
ahsayde commented 4 years ago

can't reproduce , @john-kheir can u try it again ?

Dina-Abd-Elrahman commented 4 years ago

cannot reproduce.