[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties)



> try adding python3-setuptools to Build-Depends

ok I removed all the black magic from the debian/rules and added setuptools :)

so now, I have this error when building the documentation

PYTHONPATH=`pybuild --print build_dir --interpreter python3` http_proxy='http://127.0.0.1:9/' sphinx-build -N -bhtml doc debian/html
Running Sphinx v1.7.9

Configuration error:
There is a programable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/config.py", line 161, in __init__
    execfile_(filename, config)
  File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "conf.py", line 19, in <module>
    import uncertainties
  File "/<<PKGBUILDDIR>>/uncertainties/__init__.py", line 224, in <module>
    from .core import *
  File "/<<PKGBUILDDIR>>/uncertainties/core.py", line 946, in <module>
    ord(sup): normal for (normal, sup) in TO_SUPERSCRIPT.iteritems()}
AttributeError: 'dict' object has no attribute 'iteritems'


As we can see sphinx-build even if we gives the PYTHONPATH, load the modules from the source directory

  File "/<<PKGBUILDDIR>>/uncertainties/core.py", line 946, in <module>

and not from

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.6_uncertainties/build/

which should contain the module updated with 2to3.

what is the proper way to build sphinx doc during a build process ?

Cheers

Frederic

Reply to: