AttributeError: module 'tensorflow_datasets' has no attribute 'load'

I cannot access UCF101 and download.

TensorFlow 2.10
Python 3.11.12
tensorflow_datasets 4.9.2

@MH0386,

Welcome to the Tensorflow Forum,

I faced an SSL certificate verification error while trying to download the UCF101 dataset, as shown below

!pip install tensorflow-datasets
import tensorflow_datasets as tfds
dataset_name = 'ucf101'
dataset = tfds.load(dataset_name)

The error message was:

SSLError: HTTPSConnectionPool(host=‘www.crcv.ucf.edu’, port=443): Max retries exceeded with url: /data/UCF101/UCF101TrainTestSplits-RecognitionTask.zip (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)’)))

To fix this issue, you can use the following workaround to download the dataset

  1. Install the requests ==2.27.1 library

!pip install requests==2.27.1

  1. Set the CURL_CA_BUNDLE environment variable to an empty string before your import statement, as shown below
import os
os.environ['CURL_CA_BUNDLE'] = ' '

import tensorflow_datasets as tfds
dataset_name = 'ucf101'
dataset = tfds.load(dataset_name)

Please refer to the working gist for more information.

Thank you!