-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Bug] ModuleNotFoundError: No module named 'tools.data_converter' #2352
Comments
I have the same issue. Have you solved this problem? If so, could you please give me some information? |
you can look at the Additional information section |
Thanks! I think this issue is quite odd too. |
i have the same problem ,so how to solve ? |
you can look at the Additional information section |
where is additional information section |
Got the same error on the Ubuntu. |
我解决了这个问题,反正是因为没有找到data_convert这个包,所以你需要改成这样 |
|
成功了,我在对nuscenes-mini数据集处理。 from data_converter.s3dis_data_utils import S3DISData, S3DISSegData 再重新运行一下,数据集处理的代码create_data.py 成功了 |
最简单的方法: |
|
from from tools.data_converter.s3dis_data_utils import S3DISData, S3DISSegData
from tools.data_converter.scannet_data_utils import ScanNetData, ScanNetSegData
from tools.data_converter.sunrgbd_data_utils import SUNRGBDData` to import sys
sys.path.append('/mnt/d/workspace/BEVFormer-master/tools/') # here your path
from data_converter.s3dis_data_utils import S3DISData, S3DISSegData
from data_converter.scannet_data_utils import ScanNetData, ScanNetSegData
from data_converter.sunrgbd_data_utils import SUNRGBDData it works.
|
thx a lot, this works for me. |
oh my god, this is the best solving method !!! |
Prerequisite
Task
I have modified the scripts/configs, or I'm working on my own tasks/models/datasets.
Branch
master branch https://github.com/open-mmlab/mmdetection3d
Environment
Python: 3.6.12 (default, Dec 9 2022, 16:54:45) [GCC 7.5.0]
CUDA available: False
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.9.0
PyTorch compiling details: PyTorch built with:
TorchVision: 0.10.0a0+300a8a4
OpenCV: 4.7.0
MMCV: 1.7.1
MMCV Compiler: GCC 7.5
MMCV CUDA Compiler: not available
MMDetection: 2.26.0
MMSegmentation: 0.29.1
MMDetection3D: 1.0.0rc7+b3c990a
spconv2.0: False
Reproduces the problem - code sample
none
Reproduces the problem - command or script
Reproduces the problem - error message
Traceback (most recent call last):
File "tools/create_data.py", line 5, in
from tools.data_converter import indoor_converter as indoor
ModuleNotFoundError: No module named 'tools.data_converter'
Additional information
i'm using the dev branch, and when i change the following two files like below, then it works fine. i don't know if this is a bug of the python script. Thanks for any advice.
diff --git a/tools/create_data.py b/tools/create_data.py
index 32337d1a..1c3efd74 100644
--- a/tools/create_data.py
+++ b/tools/create_data.py
@@ -2,14 +2,13 @@
import argparse
from os import path as osp
-from tools.data_converter import indoor_converter as indoor
-from tools.data_converter import kitti_converter as kitti
-from tools.data_converter import lyft_converter as lyft_converter
-from tools.data_converter import nuscenes_converter as nuscenes_converter
-from tools.data_converter.create_gt_database import (
+from data_converter import indoor_converter as indoor
+from data_converter import kitti_converter as kitti
+from data_converter import lyft_converter as lyft_converter
+from data_converter import nuscenes_converter as nuscenes_converter
+from data_converter.create_gt_database import (
GTDatabaseCreater, create_groundtruth_database)
diff --git a/tools/data_converter/indoor_converter.py b/tools/data_converter/indoor_converter.py
index ee6c0387..3c2dfa5f 100644
--- a/tools/data_converter/indoor_converter.py
+++ b/tools/data_converter/indoor_converter.py
@@ -4,9 +4,9 @@ import os
import mmcv
import numpy as np
-from tools.data_converter.s3dis_data_utils import S3DISData, S3DISSegData
-from tools.data_converter.scannet_data_utils import ScanNetData, ScanNetSegData
-from tools.data_converter.sunrgbd_data_utils import SUNRGBDData
+from data_converter.s3dis_data_utils import S3DISData, S3DISSegData
+from data_converter.scannet_data_utils import ScanNetData, ScanNetSegData
+from data_converter.sunrgbd_data_utils import SUNRGBDData
The text was updated successfully, but these errors were encountered: