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

TypeError: a bytes-like object is required, not 'str' #69

Open
ashutosh199 opened this issue Aug 28, 2019 · 2 comments
Open

TypeError: a bytes-like object is required, not 'str' #69

ashutosh199 opened this issue Aug 28, 2019 · 2 comments

Comments

@ashutosh199
Copy link

Traceback (most recent call last):
File "c:\users\anand\appdata\local\continuum\anaconda3\envs\venv\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\anand\appdata\local\continuum\anaconda3\envs\venv\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\anand\AppData\Local\Continuum\anaconda3\envs\venv\Scripts\simple_tensorflow_serving.exe_main
.py", line 5, in
File "c:\users\anand\appdata\local\continuum\anaconda3\envs\venv\lib\site-packages\simple_tensorflow_serving\server.py", line 236, in
model_name, model_base_path)
File "c:\users\anand\appdata\local\continuum\anaconda3\envs\venv\lib\site-packages\simple_tensorflow_serving\scikitlearn_inference_service.py", line 46, in init
self.model_base_path)
File "c:\users\anand\appdata\local\continuum\anaconda3\envs\venv\lib\site-packages\simple_tensorflow_serving\preprocess_util.py", line 35, in get_preprocess_postprocess_functi
on_from_model_path
preprocess_function = get_functrion_from_marshal_file(preprocess_file_path)
File "c:\users\anand\appdata\local\continuum\anaconda3\envs\venv\lib\site-packages\simple_tensorflow_serving\preprocess_util.py", line 22, in get_functrion_from_marshal_file
loaded_function = marshal.loads(preprocess_function_string)
TypeError: a bytes-like object is required, not 'str'

@zlszhonglongshen
Copy link

@ashutosh199 我也遇到了这个问题,请问解决了吗?

@tobegit3hub
Copy link
Owner

It seems that you have serialize the preprocess_function as byte object but not UTF string. Please paste more log or your testing script so that we can re-produce your problem.

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