maskfusion icon indicating copy to clipboard operation
maskfusion copied to clipboard

Python error !

Open lixz123007 opened this issue 4 years ago • 2 comments

The python of ubuntu16.04 is 3.5,it will make error when use "virtualenv python-environment". So i install python3.6 ,and build this code. When i run it with"./Maskfusion -l teddy.klg -run",the error comes:" Instructions for updating: Use tf.cast instead. Python error indicator is set: Traceback (most recent call last): File "/home/finch/fusion/maskfusion-master/build/GUI/MaskRCNN.py", line 96, in model.load_weights(model_path, by_name=True) File "/home/finch/fusion/maskfusion-master/deps/Mask_RCNN/mrcnn/model.py", line 2130, in load_weights saving.load_weights_from_hdf5_group_by_name(f, layers) File "/home/finch/fusion/maskfusion-master/python-environment/lib/python3.6/site-packages/keras/engine/saving.py", line 1224, in load_weights_from_hdf5_group_by_name original_keras_version = f.attrs['keras_version'].decode('utf8') AttributeError: 'str' object has no attribute 'decode' terminate called after throwing an instance of 'std::runtime_error' what(): Could not open MaskRCNN module. 已放弃 (核心已转储)"

lixz123007 avatar Nov 14 '20 06:11 lixz123007

Have you solved this problem?

sco09 avatar Mar 25 '21 22:03 sco09

@lixz123007 I solved this problem by deleting the "decode" part which changing this line original_keras_version = f.attrs['keras_version'].decode('utf8') to this line original_keras_version = f.attrs['keras_version']

sco09 avatar Mar 25 '21 22:03 sco09