commaai / research

dataset and code for 2016 paper "Learning a Driving Simulator"
BSD 3-Clause "New" or "Revised" License
4.12k stars 1.17k forks source link

bad marshal data errorin the view steering model.py #56

Open ahmedyahia3393 opened 6 years ago

ahmedyahia3393 commented 6 years ago

This error (ValueError: bad marshal data (unknown type code)) result when trying to execute the view steering model.py here is the result from the cmd prompt

Traceback (most recent call last): File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\utils\generic_utils.py ", line 229, in func_load raw_code = codecs.decode(code.encode('ascii'), 'base64') UnicodeEncodeError: 'ascii' codec can't encode character '\xe0' in position 46: ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "view_steering_model.py", line 94, in model = model_from_json(json.load(jfile)) File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\models.py", line 349, in model_from_json return layer_module.deserialize(config, custom_objects=custom_objects) File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\layers__init.py", l ine 55, in deserialize printable_module_name='layer') File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\utils\generic_utils.py ", line 144, in deserialize_keras_object list(custom_objects.items()))) File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\models.py", line 1349, in from_config layer = layer_module.deserialize(conf, custom_objects=custom_objects) File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\layers\init__.py", l ine 55, in deserialize printable_module_name='layer') File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\utils\generic_utils.py ", line 144, in deserialize_keras_object list(custom_objects.items()))) File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\layers\core.py", line 711, in from_config function = func_load(config['function'], globs=globs) File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\utils\generic_utils.py ", line 234, in func_load code = marshal.loads(raw_code) ValueError: bad marshal data (unknown type code)

ahmedyahia3393 commented 6 years ago

????

ahmedyahia3393 commented 6 years ago

@geohot @EderSantana @espes @rocfig @rbiasini @radarhere @Yale323 @nicolov @kkdevenda @jingzhehu @zuijiawoniu @solaris33 @cburgdorf

zwbai commented 6 years ago

I also have this problem while running the view_steering_model.py

Is there anyone else knows why?

`python view.py ./outputs/steering_model/steering_angle.json Using TensorFlow backend. Traceback (most recent call last): File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\utils\generic_utils.py", line 229, in func_load raw_code = codecs.decode(code.encode('ascii'), 'base64') UnicodeEncodeError: 'ascii' codec can't encode character '\xe0' in position 46: ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "view.py", line 124, in model = model_from_json(json.load(jfile)) File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\models.py", line 379, in model_from_json return layer_module.deserialize(config, custom_objects=custom_objects) File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\layers__init.py", line 55, in deserialize printable_module_name='layer') File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\utils\generic_utils.py", line 144, in deserialize_keras_object list(custom_objects.items()))) File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\models.py", line 1411, in from_config layer = layer_module.deserialize(conf, custom_objects=custom_objects) File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\layers\init__.py", line 55, in deserialize printable_module_name='layer') File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\utils\generic_utils.py", line 144, in deserialize_keras_object list(custom_objects.items()))) File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\layers\core.py", line 733, in from_config function = func_load(config['function'], globs=globs) File "D:\Users\Michael\Anaconda3\envs\comma\lib\site-packages\keras\utils\generic_utils.py", line 234, in func_load code = marshal.loads(raw_code) ValueError: bad marshal data (unknown type code) `

sleepless-se commented 5 years ago

I have same problem, too.

uwsgi_1 | loaded_model = model_from_json(loaded_model_json) uwsgi_1 | File "/usr/local/lib/python3.6/dist-packages/keras/models.py", line 379, in model_from_json uwsgi_1 | return layer_module.deserialize(config, custom_objects=custom_objects) uwsgi_1 | File "/usr/local/lib/python3.6/dist-packages/keras/layers/init.py", line 55, in deserialize uwsgi_1 | printable_module_name='layer') uwsgi_1 | File "/usr/local/lib/python3.6/dist-packages/keras/utils/generic_utils.py", line 144, in deserialize_keras_object uwsgi_1 | list(custom_objects.items()))) uwsgi_1 | File "/usr/local/lib/python3.6/dist-packages/keras/models.py", line 1406, in from_config uwsgi_1 | if 'class_name' not in config[0] or config[0]['class_name'] == 'Merge': uwsgi_1 | KeyError: 0


I hope this info will help us. https://github.com/keras-team/keras/issues/8612#issuecomment-347631367