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

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

Open
ahmedyahia3393 opened this issue Apr 17, 2018 · 4 comments
Open

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

ahmedyahia3393 opened this issue Apr 17, 2018 · 4 comments

Comments

@ahmedyahia3393
Copy link

ahmedyahia3393 commented Apr 17, 2018

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
Copy link
Author

????

@ahmedyahia3393 ahmedyahia3393 changed the title problem in the view steering model.py bad marshal data errorin the view steering model.py Apr 18, 2018
@zwbai
Copy link

zwbai commented Jun 14, 2018

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
Copy link

sleepless-se commented Dec 14, 2018

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.
keras-team/keras#8612 (comment)

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