question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

csvstat gives me "'NoneType' object has no attribute 'decimal_formats'" error for tutorial data

See original GitHub issue

Whenever I try csvstat for the tutorial data, I get the following error and it just stops wherever it detects the error

$ csvstat data.csv

  1. "state"

        Type of data:          Text
        Contains null values:  False
        Unique values:         1
        Most common values:    NE (1036x)

  2. "county"

        Type of data:          Text
        Contains null values:  False
        Unique values:         35
        Most common values:    DOUGLAS (760x)
                               DAKOTA (42x)
                               CASS (37x)
                               HALL (23x)
                               LANCASTER (18x)

  3. "fips"

        Type of data:          Number
        Contains null values:  False
        Unique values:         35
'NoneType' object has no attribute 'decimal_formats'
        Most common values:   

My environment:

OS X 10.11.6

python version : 2.7.10

pip version : 9.0.1

I installed csvkit via pip yesterday (Apr 8th)

Any idea?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:27 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
havardorbechcommented, Aug 4, 2017

Sweet! I can confirm that 1.0.3 solves this issue, at least on my side: sudo pip install --ignore-installed git+https://github.com/wireservice/csvkit.git@master

If anyone else is having the same issue with 1.0.2 and running macOS using system’s Python, it is worth noting that only using pip install --ignore-installed git+https://github.com/wireservice/csvkit.git@master will install csvkit, but not solve the issue - probably because pip install in this case won’t have access to the Python library.

@jpmckinney Thank you for fixing this issue!

1reaction
jpmckinneycommented, Aug 4, 2017

On macOS I would recommend not using the system’s Python, and instead use Python installed by Homebrew. The system Python causes many problems.

I personally do:

brew install pyenv
pyenv install 3.6.1
pyenv global 3.6.1
Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'NoneType' object has no attribute 'format'
The format function is an attribute of str so it needs to be called on ... on the None returned from your print...
Read more >
How To Fix Attribute Error: 'NoneType' Object Has ... - YouTube
Article Link: https://blog.finxter.com/how-to-fix- error - nonetype - object - has - no - attribute -group/ Email Academy: ...
Read more >
AttributeError: 'NoneType' object has no attribute 'head'
When I try to upload the file in CSV format, this error appears AttributeError: 'NoneType' object has no attribute 'head'.
Read more >
'NoneType' object has no attribute 'data'" in my script : r/blender
Anyone has an idea on how I can go about fixing this? just started with scripting and I'm really confused as to how...
Read more >
TypeError: 'NoneType' object has no attribute 'append'
On Career Karma, learn about the Python TypeError: 'NoneType' object has no attribute 'append', how the error works, and how to solve the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found