Skip to content

pyWinCalc: Fix error message when there is no valid API key for the igsdb #32

@RDmitchell

Description

@RDmitchell

From Christian
Mon, Nov 21, 1:26 PM


Stephen,

I can run PyWinCalc on my Mac, but we should fix this error message:
python3 igsdb_double_clear_glass.py
Traceback (most recent call last):
File "igsdb_double_clear_glass.py", line 31, in
generic_clear_3mm_glass = pywincalc.parse_json(generic_clear_3mm_glass_igsdb_response.content)
RuntimeError: Unable to parse json. It does not appear to be either of the two recognized formats. Currently only IGSDB v1 and v2 formats are supported.

You get this message if you haven't put an IGSDB API key in igsdb_interaction.py.
There is nothing in the README about this on GitHub. We should at least have a decent error message that suggests that maybe you don't have your API key set (print "Your API Key"+igsdb_api_token)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions