Skip to content

socket.timeout Error Catching #46

@jacob-roth

Description

@jacob-roth

Versions

OS: 10.12.6      
Python: 3.5
krakenex: 1.0.0a1

What are you trying to achieve?

Trying to catch a timeout error.

# code sample
except socket.timeout as e:
                print("Kraken Socket Timeout Error")
                print(e)

What do you expect to happen?

Expected error to be caught. I believe this is a naive error on my part -- just looking for the proper way to handle.

What happens instead?

I receive the below error message.

# error message
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
    except socket.timeout as e:
NameError: name 'socket' is not defined

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions