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

API v2 fixes #6931

Merged
merged 4 commits into from Jul 10, 2019
Merged

API v2 fixes #6931

merged 4 commits into from Jul 10, 2019

Conversation

sharkykh
Copy link
Contributor

@sharkykh sharkykh commented Jul 9, 2019

Better stack trace for API v2 on Python 2

The test:
raise Exception('test') in medusa/server/api/v2/log.py @ LogHandler # get
Before:

Traceback (most recent call last):
  File "c:\Dev\Medusa\ext\tornado\web.py", line 1592, in _execute
    result = yield result
  File "c:\Dev\Medusa\ext\tornado\gen.py", line 1133, in run
    value = future.result()
  File "c:\Dev\Medusa\ext\tornado\concurrent.py", line 261, in result
    raise_exc_info(self._exc_info)
  File "c:\Dev\Medusa\ext\tornado\gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "c:\Dev\Medusa\medusa\server\api\v2\base.py", line 99, in async_call
    content = yield IOLoop.current().run_in_executor(executor, prepared)
  File "c:\Dev\Medusa\ext\tornado\gen.py", line 1133, in run
    value = future.result()
  File "c:\Dev\Medusa\ext\tornado\concurrent.py", line 261, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
Exception: test

After:

Traceback (most recent call last):
  File "c:\Dev\Medusa\ext\tornado\web.py", line 1592, in _execute
    result = yield result
  File "c:\Dev\Medusa\ext\tornado\gen.py", line 1133, in run
    value = future.result()
  File "c:\Dev\Medusa\ext\tornado\concurrent.py", line 261, in result
    raise_exc_info(self._exc_info)
  File "c:\Dev\Medusa\ext\tornado\gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "c:\Dev\Medusa\medusa\server\api\v2\base.py", line 80, in async_call
    content = yield tornado_future
  File "c:\Dev\Medusa\ext\tornado\gen.py", line 1133, in run
    value = future.result()
  File "c:\Dev\Medusa\ext\tornado\concurrent.py", line 261, in result
    raise_exc_info(self._exc_info)
  File "c:\Dev\Medusa\medusa\server\api\v2\base.py", line 71, in wrapper
    result = method(*args, **kwargs)
  File "c:\Dev\Medusa\medusa\server\api\v2\log.py", line 93, in get
    raise Exception('test')
Exception: test

Fix text/plain response charset:

Before:
2019-07-10 02:12:30 INFO MAIN :: [f1dc11a] 76703: Unable to find IMDb info in the database: Pokֳ©mon
After:
2019-07-10 02:13:23 INFO MAIN :: [f1dc11a] 76703: Unable to find IMDb info in the database: Pokémon

Before: `2019-07-10 02:12:30 INFO     MAIN :: [f1dc11a] 76703: Unable to find IMDb info in the database: Pokֳ©mon`
After: `2019-07-10 02:13:23 INFO     MAIN :: [f1dc11a] 76703: Unable to find IMDb info in the database: Pokémon`
@sharkykh sharkykh added Bug Concluded Changelog Requires a changelog entry Backend labels Jul 9, 2019
@sharkykh sharkykh added this to the 0.3.5 milestone Jul 9, 2019
@sharkykh sharkykh marked this pull request as ready for review July 9, 2019 23:32
@sharkykh sharkykh removed the Changelog Requires a changelog entry label Jul 9, 2019
Remove `future` import
@medariox medariox merged commit fd5f847 into develop Jul 10, 2019
@medariox medariox deleted the bugfix/improve-py2-api-v2-stack-trace branch July 10, 2019 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants