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

ImportError: bad magic number in 'geo_map_cython_lib': b'\x03\xf3\r\n' #17

Open
ganliqiang opened this issue Jun 14, 2019 · 18 comments
Open

Comments

@ganliqiang
Copy link

the detail about the error is :Traceback (most recent call last):
File "/home/user/east/EAST-pytorch/main.py", line 11, in
from data_utils import custom_dset, collate_fn
File "/home/user/east/EAST-pytorch/data_utils.py", line 18, in
from geo_map_cython_lib import gen_geo_map
i search a lot , but not solved this error,so how to solve the error to run the code correctly?thanks..

@wqtwjt1996
Copy link

Just delete all the *.pyc files in geo_map_cython_lib folder.

@Islanna
Copy link

Islanna commented Jun 16, 2019

Just delete all the *.pyc files in geo_map_cython_lib folder.

In this case it starts to give the error "libpython2.7.so.1.0: cannot open shared object file: No such file or directory"

Does it mean this repo works only for Python2 ?

@wqtwjt1996
Copy link

You can try to run it on Python3, I used python3 and this problem was solved.

@ganliqiang
Copy link
Author

You can try to run it on Python3, I used python3 and this problem was solved.

i find this method before,but when i delete the init_.pyc, new problem occur:
ImportError: dynamic module does not define module export function (PyInit_gen_geo_map);
the init_.pyc is downloaded from git repository.do you meet the same problem?

@decajcd
Copy link

decajcd commented Jun 20, 2019

You can try to run it on Python3, I used python3 and this problem was solved.

i find this method before,but when i delete the init_.pyc, new problem occur:
ImportError: dynamic module does not define module export function (PyInit_gen_geo_map);
the init_.pyc is downloaded from git repository.do you meet the same problem?

Have you solved this problem

@wqtwjt1996
Copy link

ImportError: dynamic module does not define module export function (PyInit_gen_geo_map);
the init_.pyc
I did not meet this problem. But I guess it related to the OS you used. I used Win10.

@kalupiu
Copy link

kalupiu commented Oct 10, 2019

Just delete all the *.pyc files in geo_map_cython_lib folder.

In this case it starts to give the error "libpython2.7.so.1.0: cannot open shared object file: No such file or directory"

Does it mean this repo works only for Python2 ?

I met the same problem. Have anyone solved it yet?

@xxiaocui
Copy link

只需删除geo_map_cython_lib文件夹中的所有* .pyc文件即可。

You can try to run it on Python3, I used python3 and this problem was solved.

python3.0?I used python3.7 and that can not

@xxiaocui
Copy link

有关该错误的详细信息是:跟踪(最近一次通话最近):
文件“ /home/user/east/EAST-pytorch/main.py”,第11行,
从data_utils导入custom_dset,collat​​e_fn
文件“ / home / user / east / EAST-pytorch / data_utils.py“,第18行,
来自geo_map_cython_lib import gen_geo_map
我搜索了很多,但没有解决此错误,那么如何解决错误才能正确运行代码?

that is python3.0? I use python3.7,but the problem is not solved

@Hujiassd
Copy link

Use the ls -a command in geo_map_cython_lib to find all the .pyc files deleted.

@AaaGss
Copy link

AaaGss commented Oct 25, 2019

捕获

when i trained main.py,i met this problem.how to do with?

@empowerszc
Copy link

捕获

when i trained main.py,i met this problem.how to do with?

I have also met this problem, and I solve it by run build_ext.sh, or directly input command
python setup.py build_ext --inplace
Hope it works for you.

@AaaGss
Copy link

AaaGss commented Dec 14, 2019 via email

@ranye92
Copy link

ranye92 commented Mar 6, 2020

ImportError: dynamic module does not define module export function (PyInit_gen_geo_map);
the init_.pyc
I did not meet this problem. But I guess it related to the OS you used. I used Win10.

I have the same problem and I use Win10 too. Have anyone solved this problem? THANKS

@fengxiaoshuai
Copy link

删除__init__.pyc, 重新运行build_text.sh,python3.6, centos,docker有效

@xianyu-123
Copy link

捕获
when i trained main.py,i met this problem.how to do with?

I have also met this problem, and I solve it by run build_ext.sh, or directly input command
python setup.py build_ext --inplace
Hope it works for you.

I used this way, not solve this problem... Unresolved reference 'gen_geo_map'

@xianyu-123
Copy link

删除__init__.pyc, 重新运行build_text.sh,python3.6, centos,docker有效

亲测有效,重命名也不行

@zhangjie-biu
Copy link

Just delete all the *.pyc files in geo_map_cython_lib folder.

In this case it starts to give the error "libpython2.7.so.1.0: cannot open shared object file: No such file or directory"
Does it mean this repo works only for Python2 ?

I met the same problem. Have anyone solved it yet?

如果你删除了init_py遇到了上面的问题,可能是由于你没有在运行main.py前运行geo_map_cython_lib下的build_ext.sh脚本,你可能还需要安装cython。

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