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

TypeError: 'NoneType' object is not callable #2869

Closed
Chenfei-Kang opened this issue Sep 3, 2021 · 13 comments
Closed

TypeError: 'NoneType' object is not callable #2869

Chenfei-Kang opened this issue Sep 3, 2021 · 13 comments
Labels
bug Something isn't working

Comments

@Chenfei-Kang
Copy link

Chenfei-Kang commented Sep 3, 2021

Describe the bug

TypeError: 'NoneType' object is not callable

Steps to reproduce the bug

from datasets import load_dataset, load_metric
dataset = datasets.load_dataset("glue", 'cola')

Expected results

A clear and concise description of the expected results.

Actual results

Specify the actual results or traceback.

Environment info

  • datasets version: 1.11.0
  • Platform:
  • Python version: 3.7
  • PyArrow version:
@Chenfei-Kang Chenfei-Kang added the bug Something isn't working label Sep 3, 2021
@Chenfei-Kang Chenfei-Kang reopened this Sep 3, 2021
@albertvillanova
Copy link
Member

Hi, @Chenfei-Kang.

I'm sorry, but I'm not able to reproduce your bug:

from datasets import load_dataset

ds = load_dataset("glue", 'cola')
ds
DatasetDict({
    train: Dataset({
        features: ['sentence', 'label', 'idx'],
        num_rows: 8551
    })
    validation: Dataset({
        features: ['sentence', 'label', 'idx'],
        num_rows: 1043
    })
    test: Dataset({
        features: ['sentence', 'label', 'idx'],
        num_rows: 1063
    })
})

Could you please give more details and environment info (platform, PyArrow version)?

@Chenfei-Kang
Copy link
Author

Hi, @Chenfei-Kang.

I'm sorry, but I'm not able to reproduce your bug:

from datasets import load_dataset

ds = load_dataset("glue", 'cola')
ds
DatasetDict({
    train: Dataset({
        features: ['sentence', 'label', 'idx'],
        num_rows: 8551
    })
    validation: Dataset({
        features: ['sentence', 'label', 'idx'],
        num_rows: 1043
    })
    test: Dataset({
        features: ['sentence', 'label', 'idx'],
        num_rows: 1063
    })
})

Could you please give more details and environment info (platform, PyArrow version)?

Sorry to reply you so late.
platform: pycharm 2021 + anaconda with python 3.7
PyArrow version: 5.0.0
huggingface-hub: 0.0.16
datasets: 1.9.0

@albertvillanova
Copy link
Member

  • For the platform, we need to know the operating system of your machine. Could you please run the command datasets-cli env and copy-and-paste its output below?
  • In relation with the error, you just gave us the error type and message (TypeError: 'NoneType' object is not callable). Could you please copy-paste the complete stack trace, so that we know exactly which part of the code threw the error?

@Chenfei-Kang
Copy link
Author

  • For the platform, we need to know the operating system of your machine. Could you please run the command datasets-cli env and copy-and-paste its output below?
  • In relation with the error, you just gave us the error type and message (TypeError: 'NoneType' object is not callable). Could you please copy-paste the complete stack trace, so that we know exactly which part of the code threw the error?
  1. For the platform, here are the output:
    - datasets` version: 1.11.0
    - Platform: Windows-10-10.0.19041-SP0
    - Python version: 3.7.10
    - PyArrow version: 5.0.0
  2. For the code and error:
    from datasets import load_dataset, load_metric
    dataset = load_dataset("glue", "cola")
    Traceback (most recent call last):
    ....
    ....
    File "my_file.py", line 2, in <module>
    dataset = load_dataset("glue", "cola")
    File "My environments\lib\site-packages\datasets\load.py", line 830, in load_dataset
    **config_kwargs,
     File "My environments\lib\site-packages\datasets\load.py", line 710, in load_dataset_builder
    **config_kwargs,
    TypeError: 'NoneType' object is not callable
    Thank you!

@albertvillanova
Copy link
Member

For that environment, I am sorry but I can't reproduce the bug: I can load the dataset without any problem.

@albertvillanova
Copy link
Member

One naive question: do you have internet access from the machine where you execute the code?

@Chenfei-Kang
Copy link
Author

For that environment, I am sorry but I can't reproduce the bug: I can load the dataset without any problem.

But I can download other task dataset such as dataset = load_dataset('squad'). I don't know what went wrong. Thank you so much!

@klyuhang9
Copy link

Hi,friends. I meet the same problem. Do you have a way to fix this? Thanks!

@OptNuo
Copy link

OptNuo commented Mar 20, 2024

I'm getting the same error. Have you solved the problem? Please tell me how to fix it

@rippleD030
Copy link

same error, fix by Downgrade the datasets version to 2.16.0.

@Doby-Xu
Copy link

Doby-Xu commented Nov 19, 2024

Similar error when trying to download another dataset with 2.16.0, but 2.10.0 works

@Ki-Seki
Copy link

Ki-Seki commented Nov 24, 2024

Same issue in v3.1.0; resolved by downgrading to v2.21.0.

@no-con
Copy link

no-con commented Dec 1, 2024

same error, using the lower version 2.16.0 works

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

8 participants