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

_mask.so: undefined symbol: _Py_ZeroStruct #172

Open
ypxingxing opened this issue Jun 2, 2021 · 7 comments
Open

_mask.so: undefined symbol: _Py_ZeroStruct #172

ypxingxing opened this issue Jun 2, 2021 · 7 comments

Comments

@ypxingxing
Copy link

When I run the following command"./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc vgg16"

Such an error occurred:

Logging output to experiments/logs/test_vgg16_voc_2007_trainval_.txt.2021-06-02_22-43-16

  • [[ ! -z '' ]]
  • CUDA_VISIBLE_DEVICES=0
  • time python ./tools/test_net.py --imdb voc_2007_test --model output/vgg16/voc_2007_trainval/default/vgg16_faster_rcnn_iter_70000.pth --cfg experiments/cfgs/vgg16.yml --net vgg16 --set ANCHOR_SCALES '[8,16,32]' ANCHOR_RATIOS '[0.5,1,2]'
    Traceback (most recent call last):
    File "./tools/test_net.py", line 13, in
    from datasets.factory import get_imdb
    File "/home/xhay/pytorch-faster-rcnn/tools/../lib/datasets/factory.py", line 14, in
    from datasets.coco import coco
    File "/home/xhay/pytorch-faster-rcnn/tools/../lib/datasets/coco.py", line 23, in
    from pycocotools.coco import COCO
    File "/home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/coco.py", line 55, in
    from . import mask as maskUtils
    File "/home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/mask.py", line 3, in
    import pycocotools._mask as _mask
    ImportError: /home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct
    Command exited with non-zero status 1
    1.61user 0.40system 0:08.87elapsed 22%CPU (0avgtext+0avgdata 267140maxresident)k
    402208inputs+0outputs (1250major+34960minor)pagefaults 0swaps

Who can help me solve this problem? Please,Thank you!

@ruotianluo
Copy link
Owner

cocodataset/cocoapi#90

@ypxingxing
Copy link
Author

cocodataset/cocoapi#90

First of all, thank you for your answer, but I tried all the operations in this link, but still did not solve my problem.

When I try to run the following command"python3 ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc vgg16"

Such an error occurred:

File "./experiments/scripts/test_faster_rcnn.sh", line 5
export PYTHONUNBUFFERED="True"
^
SyntaxError: invalid syntax

@ruotianluo
Copy link
Owner

you should run bash ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc vgg16

@ypxingxing
Copy link
Author

you should run bash ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc vgg16

I have tried it,but it still shows the first error:

Logging output to experiments/logs/test_vgg16_voc_2007_trainval_.txt.2021-06-02_22-43-16

[[ ! -z '' ]]
CUDA_VISIBLE_DEVICES=0
time python ./tools/test_net.py --imdb voc_2007_test --model output/vgg16/voc_2007_trainval/default/vgg16_faster_rcnn_iter_70000.pth --cfg experiments/cfgs/vgg16.yml --net vgg16 --set ANCHOR_SCALES '[8,16,32]' ANCHOR_RATIOS '[0.5,1,2]'
Traceback (most recent call last):
File "./tools/test_net.py", line 13, in
from datasets.factory import get_imdb
File "/home/xhay/pytorch-faster-rcnn/tools/../lib/datasets/factory.py", line 14, in
from datasets.coco import coco
File "/home/xhay/pytorch-faster-rcnn/tools/../lib/datasets/coco.py", line 23, in
from pycocotools.coco import COCO
File "/home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/coco.py", line 55, in
from . import mask as maskUtils
File "/home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/mask.py", line 3, in
import pycocotools._mask as _mask
ImportError: /home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct
Command exited with non-zero status 1
1.61user 0.40system 0:08.87elapsed 22%CPU (0avgtext+0avgdata 267140maxresident)k
402208inputs+0outputs (1250major+34960minor)pagefaults 0swaps

@ruotianluo
Copy link
Owner

Because I don't think I modify any part of the coco API, so what makes the cocoapi break stay in the scope of cocoapi. There is nothing I can do more than you. What I can do is also google.

@ypxingxing
Copy link
Author

Because I don't think I modify any part of the coco API, so what makes the cocoapi break stay in the scope of cocoapi. There is nothing I can do more than you. What I can do is also google.

Thank you anyway, I will find a solution by myself

@SamMohel
Copy link

Excuse me .. did someone find a solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants