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: '_io.TextIOWrapper' object has no attribute #155

Closed
antonio-yu opened this issue Nov 29, 2022 · 2 comments
Closed

AttributeError: '_io.TextIOWrapper' object has no attribute #155

antonio-yu opened this issue Nov 29, 2022 · 2 comments

Comments

@antonio-yu
Copy link

I installed datar in another remote server .
Some errors occoured:

from datar.all import * 
from datar.datasets import mtcars 
datar >> count(f.gear)

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-25-4bc0873b22a1> in <module>
      1 from datar.datasets import mtcars
----> 2 datar >> count(f.gear)

AttributeError: '_io.TextIOWrapper' object has no attribute 'gear'
datar.get_versions()
python   : 3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05) 
           [GCC 9.3.0]
datar    : 0.9.1
numpy    : 1.20.3
pipda    : 0.8.2
executing: 1.2.0
pandas   : 1.4.2

Other functions like 'mutate','select' work well.
It seems that 'group by ' has a problem.

@pwwang
Copy link
Owner

pwwang commented Nov 29, 2022

Should be mtcars >> ...

@antonio-yu
Copy link
Author

I found out where the error came from .

when reading txt file, the variable was name as f :

open('train.txt','r',encoding='utf-8') as f:

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