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

AttributeError: arrange not found #140

Closed
ztsweet opened this issue Nov 15, 2021 · 6 comments
Closed

AttributeError: arrange not found #140

ztsweet opened this issue Nov 15, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@ztsweet
Copy link

ztsweet commented Nov 15, 2021

import tidypolars as tp
from tidypolars import col, desc
import sys
sys.version
# '3.10.0 | packaged by conda-forge | (default, Oct 12 2021, 21:24:52) [GCC 9.4.0]'
tp.__version__
# '0.2.1'
df = tp.Tibble({'x': ['a', 'a', 'b'], 'y': range(3)})
df.arrange('x', 'y')
`
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
~/miniconda3/envs/py310/lib/python3.10/site-packages/polars/eager/frame.py in __getattr__(self, item)
    882         try:
--> 883             return pl.eager.series.wrap_s(self._df.column(item))
    884         except RuntimeError:

RuntimeError: Any(NotFound("arrange"))

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_21110/1194586334.py in <module>
----> 1 df.arrange('x', 'y')

~/miniconda3/envs/py310/lib/python3.10/site-packages/polars/eager/frame.py in __getattr__(self, item)
    883             return pl.eager.series.wrap_s(self._df.column(item))
    884         except RuntimeError:
--> 885             raise AttributeError(f"{item} not found")
    886 
    887     def __iter__(self) -> Iterator[Any]:

AttributeError: arrange not found
`
@markfairbanks
Copy link
Owner

markfairbanks commented Nov 15, 2021

Does this issue still occur with python 3.9? This works fine when I run it.

@markfairbanks markfairbanks added the bug Something isn't working label Nov 15, 2021
@ztsweet
Copy link
Author

ztsweet commented Nov 15, 2021

it works fine with python 3.9 @markfairbanks

@markfairbanks
Copy link
Owner

Interesting - I’ll see if I can figure out what’s going on with 3.10 that would cause this.

For now I would recommend using 3.9 with tidypolars

@markfairbanks
Copy link
Owner

markfairbanks commented Nov 15, 2021

This works for me on 3.10 on macOS.

@mjkarlsen - does this work for you?

@mjkarlsen
Copy link
Collaborator

mjkarlsen commented Nov 15, 2021

It works for me on 3.10 on Ubuntu.

import tidypolars as tp
from tidypolars import col, desc
import sys

print(sys.version)
print(tp.__version__)
df = tp.Tibble({'x': ['a', 'a', 'b'], 'y': range(3)})
df.arrange('x', 'y')

3.10.0 (default, Nov 10 2021, 11:24:47) [Clang 12.0.0 ]
0.2.1
shape: (3, 2)
┌─────┬─────┐
│ xy   │
│ ------ │
│ stri64 │
╞═════╪═════╡
│ a0   │
├╌╌╌╌╌┼╌╌╌╌╌┤
│ a1   │
├╌╌╌╌╌┼╌╌╌╌╌┤
│ b2   │
└─────┴─────┘

@markfairbanks
Copy link
Owner

@ztsweet - I'm going to close this for now. We can keep trouble shooting here and see if we can get it to work. I think you might just need to start with a clean environment.

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

3 participants