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

Python 3,unichr not defined in util.py error #161

Closed
shivareddyiirs opened this issue Nov 15, 2017 · 2 comments
Closed

Python 3,unichr not defined in util.py error #161

shivareddyiirs opened this issue Nov 15, 2017 · 2 comments

Comments

@shivareddyiirs
Copy link
Contributor

image
in util.py line no 18 , unichr is not defined error is coming when I am using pyxform in my plugin in QGIS 3 (i.e python 3 environment)

@ukanga
Copy link
Contributor

ukanga commented Jan 2, 2018

See #164 (comment)

I will suggest you test this on the python terminal in isolation and see if a similar error occurs.

>>> from pyxform.utils import unichr
>>> unichr(10000)

@shivareddyiirs
Copy link
Contributor Author

below in my response when i tried first line in my python console in qgis3:

from pyxform.utils import unichr
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\code.py", line 91, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\shiva\AppData\Roaming\Python\Python36\site-packages\pyxform\__init__.py", line 8, in <module>
    from pyxform.survey import Survey  # noqa
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\shiva\AppData\Roaming\Python\Python36\site-packages\pyxform\survey.py", line 11, in <module>
    from pyxform.instance import SurveyInstance
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\shiva\AppData\Roaming\Python\Python36\site-packages\pyxform\instance.py", line 1, in <module>
    from pyxform.xform_instance_parser import parse_xform_instance
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\shiva\AppData\Roaming\Python\Python36\site-packages\pyxform\xform_instance_parser.py", line 8, in <module>
    from pyxform.utils import unicode
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\shiva\AppData\Roaming\Python\Python36\site-packages\pyxform\utils.py", line 18, in <module>
    unichr = unichr
NameError: name 'unichr' is not defined

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

2 participants