tinkerer icon indicating copy to clipboard operation
tinkerer copied to clipboard

Could not import extension tinkerer.ext.blog (exception: No module named builtins)

Open Dutchtallman opened this issue 6 years ago • 2 comments

Using command::

$ tinker --build

will give you this error (in python 2.7.14)::

Running Sphinx v1.7.2
loading translations [en]... done

Extension error:
Could not import extension tinkerer.ext.blog (exception: No module named builtins)

This extension is called by:

- tinkerer/ext/blog.py , calling:
- tinkerer/ext/uistr.py, calling:
- import builtins as __builtin__

By installing the future_ package::

sudo -H pip install --upgrade future

You get the builtins module_ and now using command::

$ tinker --build

gives the desired output and everything works fine again.

.. _future: http://python-future.org/index.html .. _builtins module: http://python-future.org/reference.html#module-future.builtins

Dutchtallman avatar May 09 '18 11:05 Dutchtallman

btw., thank you, this works under windows 10, too. tinkerer (1.7.1) updated my sphinx to 1.7.7 I did not get an blog/html/index.html. I don't want to build a blog but 'pages'. I'm only starting - trying tinkerer...

ThomasJanotta avatar Aug 25 '18 13:08 ThomasJanotta

Work-around:

  • Use Python3.x
  • Patch tinkerer/ext/uistr.py

PATCH: For Python2 (with six installed)

# -- FILE: tinkerer/ext/uistr.py
# ORIG: import builtins as __builtin__
from six.moves import builtins as __builtin__

jenisys avatar Sep 15 '18 11:09 jenisys