Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mottosso
Copy link
Owner

Qt.py can print an error on import that looks like..

> $ python -c "import Qt"
JSONDecodeError: Expecting value: line 1 column 1 (char 0)

But it doesn't tell you why, and if you aren't familiar with the new QT_PREFERRED_BINDING_JSON variable then I expect we'll see issues pop up here.

I've changed that message to:

> $ python -c "import Qt"
Qt.py [warning]: Failed to parse QT_PREFERRED_BINDING_JSON='blabla;bla'
Qt.py [warning]: Falling back to default preferred order

Qt.py Outdated
# Python 2 raises ValueError, Python 3 raises json.JSONDecodeError
# a subclass of ValueError
_log("JSONDecodeError: {}".format(e))
_warn("Failed to parse QT_PREFERRED_BINDING_JSON='%s'" % QT_PREFERRED_BINDING_JSON)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (95 > 79 characters)

Qt.py Outdated
# a subclass of ValueError
_log("JSONDecodeError: {}".format(e))
_warn("Failed to parse QT_PREFERRED_BINDING_JSON='%s'"
% QT_PREFERRED_BINDING_JSON)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line over-indented for visual indent

Comment on lines 611 to 615
print('out------------------')
print(out)

print('err ------------------')
print(err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, I left a lot of debug prints from trying to debug my tests. These can probably be removed. I don't think they are useful anymore.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine. Let's blame it on corona.

@mottosso mottosso merged commit 7df798b into master Mar 19, 2020
@mottosso mottosso deleted the preferred_binding_error_message branch March 19, 2020 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants