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

"xmlpatterns" demo problem. #20

Open
ogrotten opened this issue Mar 2, 2015 · 0 comments
Open

"xmlpatterns" demo problem. #20

ogrotten opened this issue Mar 2, 2015 · 0 comments

Comments

@ogrotten
Copy link

ogrotten commented Mar 2, 2015

    F:\Pythoncrap\Python34\python.exe F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py
    Traceback (most recent call last):
      File "F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py", line 168, in instanceSelected
        self.instanceEdit.setPlainText(encode_utf8(instanceData))
      File "F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py", line 24, in encode_utf8
        return str(ba, encoding='utf8')
    TypeError: coercing to str: need a bytes-like object, PySide.QtCore.QByteArray found
    Traceback (most recent call last):
      File "F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py", line 168, in instanceSelected
        self.instanceEdit.setPlainText(encode_utf8(instanceData))
      File "F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py", line 24, in encode_utf8
        return str(ba, encoding='utf8')
    TypeError: coercing to str: need a bytes-like object, PySide.QtCore.QByteArray found
    Traceback (most recent call last):
      File "F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py", line 233, in <module>
        window = MainWindow()
      File "F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py", line 138, in __init__
        self.schemaSelected(0)
      File "F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py", line 159, in schemaSelected
        self.schemaView.setPlainText(encode_utf8(schemaData))
      File "F:/Pythoncrap/Python34/Lib/site-packages/PySide/examples/xmlpatterns/schema/schema.py", line 24, in encode_utf8
        return str(ba, encoding='utf8')
    TypeError: coercing to str: need a bytes-like object, PySide.QtCore.QByteArray found

work around: change xmlpatterns/schema.py #24
from return str(ba, encoding='utf8')
to return str(ba)

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

No branches or pull requests

1 participant