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

RandomEngine.score leads to missing labels error in Pandas #5

Open
valevo opened this issue May 2, 2022 · 0 comments
Open

RandomEngine.score leads to missing labels error in Pandas #5

valevo opened this issue May 2, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@valevo
Copy link
Owner

valevo commented May 2, 2022

2508490 2022-04-07 13:51:10,032 | Exception on /examples [GET] Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/var/www/flask/sabio/app.py", line 274, in get_examples cur_d, cur_e, cur_o, cur_s = _get_example() File "/var/www/flask/sabio/app.py", line 223, in _get_example scores, details = e.score_and_detail(d.data, **param_dict) File "/var/www/flask/sabio/src/engines/RandomEnginev0.py", line 75, in score_and_detail scores = self.score(objects, round_to=round_to, **param_dict) File "/var/www/flask/sabio/src/engines/RandomEnginev0.py", line 41, in score return self.constant_scores.loc[objects.index] File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexing.py", line 895, in __getitem__ return self._getitem_axis(maybe_callable, axis=axis) File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexing.py", line 1113, in _getitem_axis return self._getitem_iterable(key, axis=axis) File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexing.py", line 1053, in _getitem_iterable keyarr, indexer = self._get_listlike_indexer(key, axis, raise_missing=False) File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexing.py", line 1266, in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing) File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexing.py", line 1321, in _validate_read_indexer raise KeyError( KeyError: "Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: Int64Index([ 2, 5, 8, 9, 10,\n ...\n 1140380, 1140385, 1140388, 1140389, 1153236],\n dtype='int64', name='ObjectID', length=144174). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"

@valevo valevo added the bug Something isn't working label May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant