Comments (6)
Hey thanks for reporting this. Unfortunately, I don't have access to a windows machine at the moment :/
But it seems a unicode-related error in the string you passed to data()
.
Since the file already exists (otherwise it would be an OSError
) but the passed string didn't match its actual dataset_id
name (although they appear with the same letters), the only thing I could think of is the character properties.
Could you verify the string type before you pass it to data()
?
Hope if someone has tried this on Win could bring some more insight into this as well.
I tried to produce this error by changing the string to unicode('utf-8'), and got the same error:
>>> data('iris'.encode('utf-8'))
Traceback (most recent call last):
File "<input>", line 1, in <module>
data('iris'.encode('utf-8'))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pydataset/__init__.py", line 36,
in data
raise Exception('Wrong dataset name! Try: data() to see available.')
Exception: Wrong dataset name! Try: data() to see available.
from pydataset.
From a quick look, it seems like this is caused by the forward slashes in https://github.com/iamaziz/PyDataset/blob/master/pydataset/locate_datasets.py#L39 and further.
Separator on Windows is r'\'
so these should be replaced by os.path.sep
.
from pydataset.
Yep that's was the issue thanks @rafguns
It should be ok now, please update to 0.1.1 and check it out.
from pydataset.
It's working as expected now. Thanks!
On Tue, Feb 2, 2016 at 12:30 PM, Aziz Alto [email protected] wrote:
—
Reply to this email directly or view it on GitHub
#1 (comment).
from pydataset.
I'm having the same problem as cory. I'm using python 3.6.2 and win 10.
`Traceback (most recent call last):
File "C:\Users\nikol\PycharmProjects\MachineLearning3\venv\lib\site-packages\pydataset_init_.py", line 34, in data
df = __read_csv(item)
File "C:\Users\nikol\PycharmProjects\MachineLearning3\venv\lib\site-packages\pydataset\datasets_handler.py", line 47, in __read_csv
path = __get_csv_path(item)
File "C:\Users\nikol\PycharmProjects\MachineLearning3\venv\lib\site-packages\pydataset\datasets_handler.py", line 43, in __get_csv_path
return items[item]
KeyError: 'Titanic'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/nikol/PycharmProjects/MachineLearning3/AulaPydata.py", line 7, in
titanic = pydataset.data('Titanic')
File "C:\Users\nikol\PycharmProjects\MachineLearning3\venv\lib\site-packages\pydataset_init_.py", line 37, in data
find_similar(item)
File "C:\Users\nikol\PycharmProjects\MachineLearning3\venv\lib\site-packages\pydataset\support.py", line 48, in find_similar
raise Exception(ERROR)
Exception: Not valid dataset name and no similar found! Try: data() to see available.`
from pydataset.
so there is solution?
from pydataset.
Related Issues (15)
- Regression/Classification info HOT 4
- Getting error in windows 10 when installing with pip3
- Importing Pydataset
- Display options set
- Fix simple typo: smiliarity -> similarity
- Distinct dataset documentation
- Provide namespaces and an index HOT 1
- Allow usage of pydataset with no external dependancies HOT 4
- Process for adding datasets? HOT 1
- Translating R to Python. Worth the effort? HOT 4
- Break same name with R HOT 1
- Merge code ? DataPackage / datasets ... HOT 2
- Please make datasets non-executable HOT 1
- get_rdatasets in statsmodels HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydataset.