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

MySql OperationalError #2

Closed
solarcloud7 opened this issue Aug 5, 2019 · 1 comment
Closed

MySql OperationalError #2

solarcloud7 opened this issue Aug 5, 2019 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@solarcloud7
Copy link
Member

image

Solution for this:

def sqlFunc(func): def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except OperationalError as e: if 'MySQL server has gone away' in str(e): sql_operator.connect() return func(*args, **kwargs) print e return wrapper

Link to example : example

@solarcloud7 solarcloud7 added the bug Something isn't working label Aug 5, 2019
@IIPoliII
Copy link
Member

IIPoliII commented Aug 5, 2019

Fail wrong project

@IIPoliII IIPoliII closed this as completed Aug 5, 2019
@IIPoliII IIPoliII added the wontfix This will not be worked on label Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants