meeshkan / hmt

HTTP Mocking Toolkit
MIT License
52 stars 7 forks source link

Exception in schema builder - path matching #182

Closed aby2s closed 4 years ago

aby2s commented 4 years ago
Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7fba040e4c80>)
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 243, in update_openapi
    path_match_result = find_matching_path(normalized_pathname, schema_paths, request_method, operation_candidate)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/build/paths.py", line 187, in find_matching_path
    pathname_with_wildcard, pathname_to_be_replaced_with_wildcard, path_match = fn(path, path_item)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/build/paths.py", line 184, in <lambda>
    lambda p, pi: _dumb_match_to_path(request_path, paths, request_method, operation_candidate)
  File "/home/nikolay/projects/meeshkan/meeshkan/meeshkan/build/paths.py", line 125, in _dumb_match_to_path
    raise ValueError('Algorithm conflict for path matching - got a match for %s %s, but then returned match === None' % (request_path, new_path))
ValueError: Algorithm conflict for path matching - got a match for /accounts/v3/accounts/gKLBnhCsw4TIALwCax3n99SFsjS9MmdnUME5aGeCBLM.TBb2WCdFe5kN6N87qvVQ4w.Qdzv56vvTwudmN8B4nvoRg /accounts/v3/accounts/{fbbtxzhd}, but then returned match === None

During OP Bank recording again