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

Runtime error "'numpy.int64' object has no attribute '__ex_id__'" #93

Closed
lars-reimann opened this issue Apr 23, 2024 · 1 comment · Fixed by #96
Closed

Runtime error "'numpy.int64' object has no attribute '__ex_id__'" #93

lars-reimann opened this issue Apr 23, 2024 · 1 comment · Fixed by #96
Assignees
Labels
bug 🪲 Something isn't working released Included in a release

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Apr 23, 2024

Describe the bug

Running the pipeline below leads to the error

[da24eb50-a015-438e-bfb2-5f47ac2175a3] 'numpy.int64' object has no attribute '__ex_id__'
	at E:\Repositories\safe-ds\Runner\src\safeds_runner\server\_pipeline_manager.py line 299
	at <frozen runpy> line 226
	at <frozen runpy> line 98
	at <frozen runpy> line 88
	at bug/gen_bla_rent line 4
	at bug/gen_bla line 25 (mapped to 'bla.sds' line 5)
	at E:\Repositories\safe-ds\Runner\src\safeds_runner\server\_pipeline_manager.py line 436
	at E:\Repositories\safe-ds\Runner\src\safeds_runner\server\_memoization_map.py line 177
	at C:\Users\Lars\AppData\Local\pypoetry\Cache\virtualenvs\safe-ds-runner-KD7s4J4Y-py3.12\Lib\site-packages\safeds\data\tabular\containers\_table.py line 1147
	at bug/gen_bla line 18 (mapped to 'bla.sds' line 5)
	at E:\Repositories\safe-ds\Runner\src\safeds_runner\server\_pipeline_manager.py line 436
	at E:\Repositories\safe-ds\Runner\src\safeds_runner\server\_memoization_map.py line 181
	at E:\Repositories\safe-ds\Runner\src\safeds_runner\server\_memoization_utils.py line 432
	at E:\Repositories\safe-ds\Runner\src\safeds_runner\server\_memoization_utils.py line 269

To Reproduce

  1. Run this pipeline:
package bug

pipeline rent {
    val houseRentData = Table({"Rent": [1,2]});
    val test = houseRentData.filterRows((r) -> ((r.getValue("Rent") as Int)<300000));
}

Expected behavior

No error.

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann lars-reimann added the bug 🪲 Something isn't working label Apr 23, 2024
@lars-reimann lars-reimann self-assigned this Apr 24, 2024
@lars-reimann lars-reimann linked a pull request Apr 24, 2024 that will close this issue
lars-reimann added a commit that referenced this issue Apr 24, 2024
Closes #93

### Summary of Changes

* Treat `numpy` datatypes as primitive, so they don't get wrapped.
* Wrap the addition of the `__ex_id__` into a try-except block to catch
a potential attribute error.
lars-reimann pushed a commit that referenced this issue Apr 24, 2024
## [0.13.1](v0.13.0...v0.13.1) (2024-04-24)

### Bug Fixes

* possible attribute error when adding `__ex_id__` ([#96](#96)) ([7cfc0e2](7cfc0e2)), closes [#93](#93)
@lars-reimann
Copy link
Member Author

🎉 This issue has been resolved in version 0.13.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working released Included in a release
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant