Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlalchemy InvalidRequestError #21

Open
xorb0ss opened this issue Jun 3, 2019 · 2 comments
Open

sqlalchemy InvalidRequestError #21

xorb0ss opened this issue Jun 3, 2019 · 2 comments

Comments

@xorb0ss
Copy link

xorb0ss commented Jun 3, 2019

After the initial installation, uploading my dataset and creating a datarun, upon hitting Run, I get the following errors in my console:

    default: Traceback (most recent call last):
    default:   File "/vagrant/venv/lib/python3.5/site-packages/flask/app.py", line 1805, in full_dispatch_request
    default:     rv = self.dispatch_request()
    default:   File "/vagrant/venv/lib/python3.5/site-packages/flask/app.py", line 1791, in dispatch_request
    default:     return self.view_functions[rule.endpoint](**req.view_args)
    default:   File "/vagrant/server/atm_server/api.py", line 381, in dispatch_single_worker
    default:     start_worker(datarun_id)
    default:   File "/vagrant/server/atm_server/atm_helper/worker.py", line 193, in start_worker
    default:     datarun = db.get_datarun(datarun_id)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/atm/database.py", line 38, in call
    default:     result = func(db, *args, **kwargs)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/atm/database.py", line 358, in get_datarun
    default:     return self.session.query(self.Datarun).get(datarun_id)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1543, in query
    default:     return self._query_cls(entities, self, **kwargs)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 168, in __init__
    default:     self._set_entities(entities)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 200, in _set_entities
    default:     self._set_entity_selectables(self._entities)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 231, in _set_entity_selectables
    default:     ent.setup_entity(*d[entity])
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 4083, in setup_entity
    default:     self._with_polymorphic = ext_info.with_polymorphic_mappers
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 855, in __get__
    default:     obj.__dict__[self.__name__] = result = self.fget(obj)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 2135, in _with_polymorphic_mappers
    default:     configure_mappers()
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 3225, in configure_mappers
    default:     raise e
    default: sqlalchemy.exc.InvalidRequestError: One or more mappers failed to initialize - can't proceed with initialization of other mappers. Triggering mapper: 'mapped class Classifier->cl
assifiers'. Original exception was: Mapper 'mapped class Hyperpartition->hyperpartitions' has no property 'classifiers'
    default: [INFO] [12:29:44:werkzeug] 10.0.2.2 - - [03/Jun/2019 12:29:44] "GET /api/start_worker/1 HTTP/1.1" 500 -
@felipeportella
Copy link

felipeportella commented Jun 3, 2019

I'm facing a similar sqlalchemy error but for class Datarun, following the exact same steps described by @xorb0ss :

    default: Traceback (most recent call last):
    default:   File "/vagrant/venv/lib/python3.5/site-packages/flask/app.py", line 1805, in full_dispatch_request
    default:     rv = self.dispatch_request()
    default:   File "/vagrant/venv/lib/python3.5/site-packages/flask/app.py", line 1791, in dispatch_request
    default:     return self.view_functions[rule.endpoint](**req.view_args)
    default:   File "/vagrant/server/atm_server/api.py", line 348, in post_new_datarun
    default:     datarun_id = new_datarun(db, upload_run_conf, run_per_partition)
    default:   File "/vagrant/server/atm_server/atm_helper/helpers.py", line 108, in new_datarun
    default:     dataset = db.get_dataset(run_config.dataset_id)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/atm/database.py", line 38, in call
    default:     result = func(db, *args, **kwargs)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/atm/database.py", line 353, in get_dataset
    default:     return self.session.query(self.Dataset).get(dataset_id)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1543, in query
    default:     return self._query_cls(entities, self, **kwargs)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 168, in __init__
    default:     self._set_entities(entities)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 200, in _set_entities
    default:     self._set_entity_selectables(self._entities)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 231, in _set_entity_selectables
    default:     ent.setup_entity(*d[entity])
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 4083, in setup_entity
    default:     self._with_polymorphic = ext_info.with_polymorphic_mappers
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 855, in __get__
    default:     obj.__dict__[self.__name__] = result = self.fget(obj)
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 2135, in _with_polymorphic_mappers
    default:     configure_mappers()
    default:   File "/vagrant/venv/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 3225, in configure_mappers
    default:     raise e
    default: sqlalchemy.exc.InvalidRequestError: One or more mappers failed to initialize - can't proceed with initialization of other mappers. Triggering mapper: 'mapped class Datarun->dataruns'. Original exception was: Mapper 'mapped class Dataset->datasets' has no property 'dataruns'

@felipeportella
Copy link

Still facing the same error after Merge pull request #23 , which fixed some of the scripts ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants