EAST icon indicating copy to clipboard operation
EAST copied to clipboard

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

Open ganliqiang opened this issue 5 years ago • 18 comments

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..

ganliqiang avatar Jun 14 '19 07:06 ganliqiang

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

wqtwjt1996 avatar Jun 16 '19 01:06 wqtwjt1996

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 ?

Islanna avatar Jun 16 '19 09:06 Islanna

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

wqtwjt1996 avatar Jun 16 '19 18:06 wqtwjt1996

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?

ganliqiang avatar Jun 17 '19 01:06 ganliqiang

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

decajcd avatar Jun 20 '19 08:06 decajcd

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.

wqtwjt1996 avatar Jun 27 '19 16:06 wqtwjt1996

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?

kalupiu avatar Oct 10 '19 03:10 kalupiu

只需删除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 avatar Oct 10 '19 08:10 xxiaocui

有关该错误的详细信息是:跟踪(最近一次通话最近): 文件“ /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

xxiaocui avatar Oct 10 '19 08:10 xxiaocui

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

Hujiassd avatar Oct 14 '19 03:10 Hujiassd

捕获

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

AaaGss avatar Oct 25 '19 16:10 AaaGss

捕获

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.

empowerszc avatar Dec 14 '19 14:12 empowerszc

thank you

---Original--- From: "Zhu Chuan"<[email protected]> Date: Sat, Dec 14, 2019 22:14 PM To: "songdejia/EAST"<[email protected]>; Cc: "Comment"<[email protected]>;"AagsAags"<[email protected]>; Subject: Re: [songdejia/EAST] ImportError: bad magic number in 'geo_map_cython_lib': b'\x03\xf3\r\n' (#17)

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

AaaGss avatar Dec 14 '19 15:12 AaaGss

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

ranye92 avatar Mar 06 '20 02:03 ranye92

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

fengxiaoshuai avatar Jun 27 '20 10:06 fengxiaoshuai

捕获 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 avatar Dec 26 '20 11:12 xianyu-123

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

亲测有效,重命名也不行

xianyu-123 avatar Dec 26 '20 11:12 xianyu-123

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。

zhangjie-biu avatar Nov 01 '21 04:11 zhangjie-biu