meeshkan / hmt

HTTP Mocking Toolkit
MIT License
52 stars 7 forks source link

Exception in schema builder #181

Open aby2s opened 4 years ago

aby2s commented 4 years ago
Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7fbabd802c80>)
Traceback (most recent call last):
  File "/home/nikolay/anaconda3/envs/py36/lib/python3.6/site-packages/tornado/ioloop.py", line 758, in _run_callback
    ret = callback()
  File "/home/nikolay/anaconda3/envs/py36/lib/python3.6/site-packages/tornado/stack_context.py", line 300, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/nikolay/anaconda3/envs/py36/lib/python3.6/site-packages/tornado/iostream.py", line 752, in wrapper
    return callback(*args)
  File "/home/nikolay/anaconda3/envs/py36/lib/python3.6/site-packages/tornado/stack_context.py", line 300, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/serve/record/channel.py", line 304, in on_server_close
    self.remove_channel()
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/serve/record/channel.py", line 298, in remove_channel
    self.flush(check_length=False)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/serve/record/channel.py", line 245, in flush
    self._proxy_calback.on_request_complete(self._request, resp)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/serve/record/proxy.py", line 52, in on_request_complete
    self._data_callback.log(request, response)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/serve/utils/data_callback.py", line 75, in log
    self._specs[host], reqres, self._update_mode
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/build/builder.py", line 288, in update_openapi
    operation = update_operation(existing_operation, exchange, mode)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/build/builder.py", line 189, in update_operation
    response = update_response(existing_response, mode, request)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/build/builder.py", line 119, in update_response
    schema=update_text_schema(v, mode, schema=response.headers.get(k, None))) for k, v in useable_headers.items()
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/build/builder.py", line 119, in <dictcomp>
    schema=update_text_schema(v, mode, schema=response.headers.get(k, None))) for k, v in useable_headers.items()
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/build/media_types.py", line 30, in update_text_schema
    oneOf=[specific, *([] if schema is None else [schema] if schema.oneOf is None else schema.oneOf)]
AttributeError: 'Header' object has no attribute 'oneOf'
aby2s commented 4 years ago

It appears during OB Bank recordings sometimes.