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

Loading Error #4

Open
fengredrum opened this issue Mar 4, 2020 · 7 comments
Open

Loading Error #4

fengredrum opened this issue Mar 4, 2020 · 7 comments

Comments

@fengredrum
Copy link

fengredrum commented Mar 4, 2020

Loading test image from web browser got this error:
`find: -xtype: unknown primary or operator
make: pse.so is up to date.
device: cpu
load models
device: cpu
load models
device: cpu
load models
device: cpu
load models
http://0.0.0.0:8080/
127.0.0.1:57218 - - [04/Mar/2020 16:53:54] "HTTP/1.1 GET /ocr" - 200 OK
Traceback (most recent call last):
File "/Users/oblivion/anaconda3/envs/tf37/lib/python3.7/site-packages/web/application.py", line 289, in process
return self.handle()
File "/Users/oblivion/anaconda3/envs/tf37/lib/python3.7/site-packages/web/application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "/Users/oblivion/anaconda3/envs/tf37/lib/python3.7/site-packages/web/application.py", line 530, in _delegate
return handle_class(cls)
File "/Users/oblivion/anaconda3/envs/tf37/lib/python3.7/site-packages/web/application.py", line 508, in handle_class
return tocall(*args)
File "/Users/oblivion/chineseocr_lite/app.py", line 83, in POST
result= text_predict(img)
File "/Users/oblivion/chineseocr_lite/model.py", line 119, in text_predict
preds, boxes_list, rects_re, t = text_handle.predict(img, long_size=pse_long_size)
File "/Users/oblivion/chineseocr_lite/psenet/PSENET.py", line 99, in predict
preds, boxes_list,rects = pse_decode(preds[0], self.scale)
File "/Users/oblivion/chineseocr_lite/psenet/pse/init.py", line 58, in decode
pred, label_values = pse_warpper(preds, 5)
File "/Users/oblivion/chineseocr_lite/psenet/pse/init.py", line 19, in pse_warpper
from .pse import pse_cpp
ImportError: dlopen(/Users/oblivion/chineseocr_lite/psenet/pse/pse.so, 2): no suitable image found. Did find:
/Users/oblivion/chineseocr_lite/psenet/pse/pse.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03
/Users/oblivion/chineseocr_lite/psenet/pse/pse.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03

127.0.0.1:57226 - - [04/Mar/2020 16:54:43] "HTTP/1.1 POST /ocr" - 500 Internal Server Error
`

Any idea what happened?
Platform: MacOS 10.15.3 Python 3.7 Pytorch 1.4.0

@DayBreak-u
Copy link
Owner

try cd psenet dir to make pse moudle?

@fengredrum
Copy link
Author

I'm sorry, I'm not familiar with C++, could you explain more specifically?

@DayBreak-u
Copy link
Owner

cd psenet/pse
rm -rf pse.so
make

@fengredrum
Copy link
Author

Still no sign of luck...

cmake output is:
find: -xtype: unknown primary or operator
c++ -o pse.so -I include -std=c++11 -O3 -I/Users/oblivion/anaconda3/include/python3.7m -I/Users/oblivion/anaconda3/include/python3.7m -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/oblivion/anaconda3/include -arch x86_64 -I/Users/oblivion/anaconda3/include -arch x86_64 -L/Users/oblivion/anaconda3/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation pse.cpp --shared -fPIC
pse.cpp:32:29: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for (size_t i = 0; i<h; i++)
^
pse.cpp:39:29: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for (size_t i = 0; i<h; i++)
^
pse.cpp:42:32: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for(size_t j = 0; j<w; j++)
^
3 warnings generated.
warning: (x86_64) /tmp/lto.o unable to open object file: No such file or directory

And run app.py got this error:
find: -xtype: unknown primary or operator
make: `pse.so' is up to date.
device: cpu
load models
device: cpu
load models
device: cpu
load models
device: cpu
load models
http://0.0.0.0:8080/
127.0.0.1:57911 - - [04/Mar/2020 18:55:49] "HTTP/1.1 GET /ocr" - 200 OK
zsh: segmentation fault python app.py 8080

@DayBreak-u
Copy link
Owner

I'm sorry! I was experimenting with Linux, and I probably didn't know there were problems with Unix

@ninjarz
Copy link

ninjarz commented Mar 5, 2020

Still no sign of luck...

cmake output is:
find: -xtype: unknown primary or operator
c++ -o pse.so -I include -std=c++11 -O3 -I/Users/oblivion/anaconda3/include/python3.7m -I/Users/oblivion/anaconda3/include/python3.7m -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/oblivion/anaconda3/include -arch x86_64 -I/Users/oblivion/anaconda3/include -arch x86_64 -L/Users/oblivion/anaconda3/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation pse.cpp --shared -fPIC
pse.cpp:32:29: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for (size_t i = 0; i<h; i++)
^
pse.cpp:39:29: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for (size_t i = 0; i<h; i++)
^
pse.cpp:42:32: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for(size_t j = 0; j<w; j++)
^
3 warnings generated.
warning: (x86_64) /tmp/lto.o unable to open object file: No such file or directory

And run app.py got this error:
find: -xtype: unknown primary or operator
make: `pse.so' is up to date.
device: cpu
load models
device: cpu
load models
device: cpu
load models
device: cpu
load models
http://0.0.0.0:8080/
127.0.0.1:57911 - - [04/Mar/2020 18:55:49] "HTTP/1.1 GET /ocr" - 200 OK
zsh: segmentation fault python app.py 8080

Do not use conda, run this in you bash:
conda deactivate
and make it again

@fengredrum
Copy link
Author

Still no sign of luck...
cmake output is:
find: -xtype: unknown primary or operator
c++ -o pse.so -I include -std=c++11 -O3 -I/Users/oblivion/anaconda3/include/python3.7m -I/Users/oblivion/anaconda3/include/python3.7m -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/oblivion/anaconda3/include -arch x86_64 -I/Users/oblivion/anaconda3/include -arch x86_64 -L/Users/oblivion/anaconda3/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation pse.cpp --shared -fPIC
pse.cpp:32:29: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for (size_t i = 0; i<h; i++)
^
pse.cpp:39:29: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for (size_t i = 0; i<h; i++)
^
pse.cpp:42:32: warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for(size_t j = 0; j<w; j++)
^
3 warnings generated.
warning: (x86_64) /tmp/lto.o unable to open object file: No such file or directory
And run app.py got this error:
find: -xtype: unknown primary or operator
make: `pse.so' is up to date.
device: cpu
load models
device: cpu
load models
device: cpu
load models
device: cpu
load models
http://0.0.0.0:8080/
127.0.0.1:57911 - - [04/Mar/2020 18:55:49] "HTTP/1.1 GET /ocr" - 200 OK
zsh: segmentation fault python app.py 8080

Do not use conda, run this in you bash:
conda deactivate
and make it again

Thx.
But got same error as before. But I've successful run the code in a Docker container.

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