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.

module 'kapture.io.csv' has no attribute 'get_all_tar_handlers'

See original GitHub issue

Hi ! I have an error “module ‘kapture.io.csv’ has no attribute ‘get_all_tar_handlers’” after executing string in python

tar_handlers = csv.get_all_tar_handlers(dataset_path)

Here are my steps:

Have cloned this repo, created docker images in according to guide, then I had to correct launch of docker container in order to launch jupyter notebook inside docker container:

docker run -it --rm --runtime=nvidia \
                  --volume <path_to_all_my_dataset>:/dataset:rw kapture/kapture --privileged --net "host" -p 8888:8888

Then I had to install jupterlab inside docker container due to absence this package in DockerFile for kapture:

 pip install jupyterlab notebook

After that I launched jupyter notebook:

jupyter notebook --ip 0.0.0.0 --port 8888 --no-browser --allow-root

Then I opened jupyter notebook and executed the following strings:

import sys
REPO_ROOT_PATH = '/opt/src/kapture/'
sys.path.insert(0, REPO_ROOT_PATH)
import kapture
import kapture.io.csv as csv

dataset_path = '/dataset/NAVER_Labs/'
tar_handlers = csv.get_all_tar_handlers(dataset_path)

After the last command I got the error :

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-958e2eb94904> in <module>
----> 1 tar_handlers = csv.get_all_tar_handlers(dataset_path)

AttributeError: module 'kapture.io.csv' has no attribute 'get_all_tar_handlers'

How to resolve this error ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jujumocommented, Jan 18, 2022

The kapture downloader will automatically untar the archive, and thus you will no longer need to use get_all_tar_handlers. But as Martin mentioned, you still can untar manually. If for some reasons you still want to use tar datasets you cannot use it like this, on the all dataset, but refer to : https://github.com/naver/kapture#example-file-structure

0reactions
IaroslavScommented, Jan 18, 2022

Thanks, I see. My dataset was not organised as in https://github.com/naver/kapture#example-file-structure

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'module' object has no attribute 'reader' [duplicate]
when I run the code below but I can't see why? import csv with open('test.csv') as f: q = csv.
Read more >
Module 'csv' has no attribute 'reader' in Python | bobbyhadz
The Python "AttributeError module 'csv' has no attribute 'reader'" occurs when we have a local file named csv.py and try to import from...
Read more >
AttributeError: module 'csv' has no attribute 'reader'
Hi All, I am using below code to read the data from csv file , getting error. AttributeError: module 'csv' has no attribute...
Read more >
module csv has no attribute 'reader' (Example) - Treehouse
Hi,. I am stuck triyng to read csv file. every time return AttributeError: that module csv has no attribute 'reader'.
Read more >
How to Resolve Module Has No Attribute - Python Error ...
In this tutorial I will be showing you how to MANAGE THE " MODULE HAS NO ATTRIBUTE " ERROR MESSAGE using Python. This...
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