Closed mbprog91 closed 3 years ago
Finally, today I solved this problem. This problem are appearing not only in this library. Solution is an downgrade h5py library to 2.10.0. You can do it, using this code: pip install h5py==2.10.0
It help me. I hopy it help and you too.
Hi! Almost for a one week I am trying to install EmoPy. I am using Ubuntu 18.04 with python 3.6.6 on virtualenv. All dependecies are matching for requirements of EmoPy. But when I am trying to run fermodel_example.py, but getting many warnings and error. Have anybody any suggestions to solve this problem?
Error:
Using TensorFlow backend. /home/mark/venv_emoji_upd_2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/mark/venv_emoji_upd_2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/mark/venv_emoji_upd_2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/mark/venv_emoji_upd_2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:529: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /home/mark/venv_emoji_upd_2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:530: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /home/mark/venv_emoji_upd_2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) Initializing FER model parameters for target emotions: ['calm', 'anger', 'happiness'] Traceback (most recent call last): File "fermodel_example.py", line 5, in
model = FERModel(target_emotions, verbose=False)
File "/home/mark/emo_re/EmoPy/EmoPy/src/fermodel.py", line 41, in init
self._initialize_model()
File "/home/mark/emo_re/EmoPy/EmoPy/src/fermodel.py", line 45, in _initialize_model
self.model, self.emotion_map = self._choose_model_from_target_emotions()
File "/home/mark/emo_re/EmoPy/EmoPy/src/fermodel.py", line 112, in _choose_model_from_target_emotions
return load_model(resource_filename('EmoPy', model_file)), emotion_map
File "/home/mark/venv_emoji_upd_2/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model
model = _deserialize_model(f, custom_objects, compile)
File "/home/mark/venv_emoji_upd_2/lib/python3.6/site-packages/keras/engine/saving.py", line 224, in _deserialize_model
model_config = json.loads(model_config.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode
My "pip freeze" if it can be helpful: absl-py==0.11.0 actionlib==1.13.2 angles==1.9.13 astor==0.8.1 attrs==20.3.0 bondpy==1.8.6 cached-property==1.5.2 camera-calibration==1.15.2 camera-calibration-parsers==1.12.0 catkin==0.8.9 controller-manager==0.19.3 controller-manager-msgs==0.19.3 coverage==4.5.3 cv-bridge==1.15.0 cycler==0.10.0 decorator==4.4.2 diagnostic-analysis==1.10.2 diagnostic-common-diagnostics==1.10.2 diagnostic-updater==1.10.2 dynamic-reconfigure==1.7.1 -e git+https://github.com/thoughtworksarts/EmoPy.git@47af511ee65e2a1d2f12b7735bb07c6360b43ca8#egg=EmoPy gast==0.4.0 gazebo-plugins==2.9.1 gazebo-ros==2.9.1 gencpp==0.6.5 geneus==3.0.0 genlisp==0.4.18 genmsg==0.5.16 gennodejs==2.0.2 genpy==0.6.14 google-pasta==0.2.0 graphviz==0.16 grpcio==1.34.0 h5py==3.1.0 image-geometry==1.15.0 imageio==2.9.0 importlib-metadata==3.4.0 iniconfig==1.1.1 interactive-markers==1.12.0 joblib==1.0.0 joint-state-publisher==1.15.0 joint-state-publisher-gui==1.15.0 Keras==2.2.4 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.2 kiwisolver==1.3.1 Lasagne==0.1 laser-geometry==1.6.5 Markdown==3.3.3 matplotlib==3.2.2 mavros==1.5.0 message-filters==1.15.9 mock==4.0.3 networkx==2.5 numpy==1.17.4 opencv-python==4.5.1.48 packaging==20.8 Pillow==8.1.0 pluggy==0.13.1 protobuf==3.14.0 py==1.10.0 pydot==1.4.1 pyparsing==2.4.7 pytest==6.2.1 python-dateutil==2.8.1 python-qt-binding==0.4.3 PyWavelets==1.1.1 PyYAML==5.3.1 qt-dotgraph==0.4.2 qt-gui==0.4.2 qt-gui-cpp==0.4.2 qt-gui-py-common==0.4.2 resource-retriever==1.12.6 ros-pytest==0.2.0 rosapi==0.11.10 rosbag==1.15.9 rosboost-cfg==1.15.7 rosbridge-library==0.11.10 rosbridge-server==0.11.10 rosclean==1.15.7 roscreate==1.15.7 rosgraph==1.15.9 roslaunch==1.15.9 roslib==1.15.7 roslint==0.12.0 roslz4==1.15.9 rosmake==1.15.7 rosmaster==1.15.9 rosmsg==1.15.9 rosnode==1.15.9 rosparam==1.15.9 rospy==1.15.9 rosservice==1.15.9 rostest==1.15.9 rostopic==1.15.9 rosunit==1.15.7 roswtf==1.15.9 rqt-action==0.4.9 rqt-bag==0.5.0 rqt-bag-plugins==0.5.0 rqt-console==0.4.11 rqt-dep==0.4.10 rqt-graph==0.4.14 rqt-gui==0.5.2 rqt-gui-py==0.5.2 rqt-image-view==0.4.16 rqt-launch==0.4.9 rqt-logger-level==0.4.11 rqt-moveit==0.5.9 rqt-msg==0.4.9 rqt-nav-view==0.5.7 rqt-plot==0.4.12 rqt-pose-view==0.5.10 rqt-publisher==0.4.9 rqt-py-common==0.5.2 rqt-py-console==0.4.9 rqt-reconfigure==0.5.3 rqt-robot-dashboard==0.5.8 rqt-robot-monitor==0.5.13 rqt-robot-steering==0.5.12 rqt-runtime-monitor==0.5.8 rqt-rviz==0.6.1 rqt-service-caller==0.4.9 rqt-shell==0.4.10 rqt-srv==0.4.8 rqt-tf-tree==0.6.2 rqt-top==0.4.9 rqt-topic==0.4.12 rqt-web==0.4.9 rviz==1.14.4 scikit-image==0.13.1 scikit-learn==0.24.0 scikit-neuralnetwork==0.7 scipy==1.0.0 sensor-msgs==1.13.0 six==1.15.0 smach==2.5.0 smach-ros==2.5.0 smclib==1.8.6 tensorboard==1.13.1 tensorflow==1.13.1 tensorflow-estimator==1.13.0 termcolor==1.1.0 tf==1.13.2 tf-conversions==1.13.2 tf2-geometry-msgs==0.7.5 tf2-kdl==0.7.5 tf2-py==0.7.5 tf2-ros==0.7.5 Theano==1.0.5 threadpoolctl==2.1.0 toml==0.10.2 topic-tools==1.15.9 typing-extensions==3.7.4.3 Werkzeug==1.0.1 wrapt==1.12.1 xacro==1.14.5 zipp==3.4.0