freezer(ussuri) - a bytes-like object is required, not 'str'

asked 2020-06-17 11:19:47 -0500

yavuzs gravatar image

updated 2020-06-23 05:58:26 -0500

Hi everyone,

I am trying to install freezer(ussuri) with python3.6(also tried with 3.7). The steps...

  1. git clone https://github.com/openstack/freezer-api.git (https://github.com/openstack/freezer-...) -b stable/ussuri
  2. pip3 install -r requirements.txt
  3. python3 setup.py install
  4. edit config files
  5. freezer-api

freezer-api can start server without problem but when I do a request I got the error below:

Exception happened during processing of request from ('127.0.0.1', 45552)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/paste/httpserver.py", line 1092, in process_request_in_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.6/socketserver.py", line 364, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.6/socketserver.py", line 724, in __init__
    self.handle()
  File "/usr/local/lib/python3.6/dist-packages/paste/httpserver.py", line 460, in handle
    BaseHTTPRequestHandler.handle(self)
  File "/usr/lib/python3.6/http/server.py", line 418, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.6/dist-packages/paste/httpserver.py", line 455, in handle_one_request
    self.wsgi_execute()
  File "/usr/local/lib/python3.6/dist-packages/paste/httpserver.py", line 308, in wsgi_execute
    self.wsgi_write_chunk(chunk)
  File "/usr/local/lib/python3.6/dist-packages/paste/httpserver.py", line 168, in wsgi_write_chunk
    self.wfile.write(chunk)
  File "/usr/lib/python3.6/socketserver.py", line 803, in write
    self._sock.sendall(b)
TypeError: a bytes-like object is required, not 'str'



----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 45464)
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/paste/httpserver.py", line 1092, in process_request_in_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.7/dist-packages/paste/httpserver.py", line 460, in handle
    BaseHTTPRequestHandler.handle(self)
  File "/usr/lib/python3.7/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.7/dist-packages/paste/httpserver.py", line 455, in handle_one_request
    self.wsgi_execute()
  File "/usr/local/lib/python3.7/dist-packages/paste/httpserver.py", line 308, in wsgi_execute
    self.wsgi_write_chunk(chunk)
  File "/usr/local/lib/python3.7/dist-packages/paste/httpserver.py", line 168, in wsgi_write_chunk
    self.wfile.write(chunk)
  File "/usr/lib/python3.7/socketserver.py", line 799, in write
    self._sock.sendall(b)
TypeError: a bytes-like object is required, not 'str'
----------------------------------------

Did I miss something? Can anyone help me?

With mod_wsgi there is an error below:

Exception occurred processing WSGI script '/opt/stack/freezer_api/cmd/wsgi.py'.
TypeError: sequence of byte string values expected, value of type str found
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-06-19 13:12:39 -0500

zaneb gravatar image

This is a bug caused by an incomplete port to Python 3.

Most OpenStack service APIs are now designed to run using uWSGI (i.e. inside e.g. Apache) rather than as standalone python processes. Almost all production deployments are now run this way. So probably this standalone configuration of Freezer has not been tested since before it was ported to Python 3.

edit flag offensive delete link more

Comments

hi, thanks for info but this time there is another error. I've included error at question.

yavuzs gravatar imageyavuzs ( 2020-06-23 05:38:10 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2020-06-17 11:19:47 -0500

Seen: 78 times

Last updated: Jun 23