-
Notifications
You must be signed in to change notification settings - Fork 175
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
AttributeError: 'NoneType' object has no attribute 'FileHandler' while converting ONNX to RKNN #465
Comments
### I also encountered this problem when i try to precompile. (rknn toolkit 1.7.5) (py3.8-rknntoolkit1.7.5) developer@EASY-EAI-Develop:~$ python precompile.py driver.rknn driver_precompile.rknn |
请使用load_onnx接口加载ONNX模型,load_pytorch接口加载的是torch script模型。 |
这个错误是最后退出脚本报的,可以不用管。 |
W rknn-toolkit version: 1.7.5
W Verbose file path is invalid, debug info will not dump to file.
D Using CPPUTILS: True
--> config model
done
--> Loading model
I Start importing pytorch...
./models/best.onnx ********************
D import clients finished
E Catch exception when loading pytorch model: ./models/best.onnx!
E Traceback (most recent call last):
E File "rknn/base/RKNNlib/converter/convert_pytorch_new.py", line 5227, in rknn.base.RKNNlib.converter.convert_pytorch_new.convert_pytorch.load
E File "rknn/base/RKNNlib/converter/pytorch_util.py", line 76, in rknn.base.RKNNlib.converter.pytorch_util.check_model_pt_version
E File "rknn/base/RKNNlib/converter/pytorch_util.py", line 77, in rknn.base.RKNNlib.converter.pytorch_util.check_model_pt_version
E File "/home/kris/anaconda3/envs/rk/lib/python3.8/zipfile.py", line 1271, in init
E self._RealGetContents()
E File "/home/kris/anaconda3/envs/rk/lib/python3.8/zipfile.py", line 1338, in _RealGetContents
E raise BadZipFile("File is not a zip file")
E zipfile.BadZipFile: File is not a zip file
E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
Load pytorch model failed!
Exception ignored in: <function RKNN.del at 0x7f69d6705af0>
Traceback (most recent call last):
File "/home/kris/anaconda3/envs/rk/lib/python3.8/site-packages/rknn/api/rknn.py", line 781, in del
AttributeError: 'NoneType' object has no attribute 'FileHandler'
(rk) kris@ubuntu:~/Downloads/rknpu-master/rknn/rknn_api/examples/rknn_yolov5_demo/convert_rknn_demo/yolov5$
The text was updated successfully, but these errors were encountered: