TypeError: an integer is required (got type bytes)

22 views
Skip to first unread message

Marcelo Huerta

unread,
May 21, 2020, 8:54:52 AM5/21/20
to nikola-discuss
In my current setup (latest Nikola 8.0.4, commit1477b4d, on Windows 7 Build 7601  Service Pack 1, Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)]) I get the following error:

> nikola -h

Traceback (most recent call last):
  File "c:\prog\python38-32\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\prog\python38-32\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Prog\Python38-32\Scripts\nikola.exe\__main__.py", line 4, in <module>
  File "c:\prog\python38-32\lib\site-packages\nikola\__init__.py", line 39, in <module>
    from .nikola import Nikola  # NOQA
  File "c:\prog\python38-32\lib\site-packages\nikola\nikola.py", line 51, in <module>
    from . import DEBUG, SHOW_TRACEBACKS, filters, utils, hierarchy_utils, shortcodes
  File "c:\prog\python38-32\lib\site-packages\nikola\filters.py", line 45, in <module>
    from .utils import req_missing, LOGGER, slugify
  File "c:\prog\python38-32\lib\site-packages\nikola\utils.py", line 60, in <module>
    from doit import tools
  File "c:\prog\python38-32\lib\site-packages\doit\__init__.py", line 33, in <module>
    from doit.doit_cmd import get_var
  File "c:\prog\python38-32\lib\site-packages\doit\doit_cmd.py", line 14, in <module>
    from .cmd_run import Run
  File "c:\prog\python38-32\lib\site-packages\doit\cmd_run.py", line 8, in <module>
    from .runner import Runner, MRunner, MThreadRunner
  File "c:\prog\python38-32\lib\site-packages\doit\runner.py", line 8, in <module>
    import cloudpickle
  File "c:\prog\python38-32\lib\site-packages\cloudpickle\__init__.py", line 3, in <module>
    from cloudpickle.cloudpickle import *
  File "c:\prog\python38-32\lib\site-packages\cloudpickle\cloudpickle.py", line 151, in <module>
    _cell_set_template_code = _make_cell_set_template_code()
  File "c:\prog\python38-32\lib\site-packages\cloudpickle\cloudpickle.py", line 132, in _make_cell_set_template_code
    return types.CodeType(
TypeError: an integer is required (got type bytes)






Roberto Alsina

unread,
May 21, 2020, 8:58:02 AM5/21/20
to Nikola—Discuss
That is ... deeply weird.

Could you remove your .doit.db and try again?

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/7505cfe3-d8f3-48dd-aa83-bce88ed0704c%40googlegroups.com.

Marcelo Huerta

unread,
May 21, 2020, 9:03:44 AM5/21/20
to nikola-discuss

El jueves, 21 de mayo de 2020, 9:58:02 (UTC-3), Roberto Alsina escribió:
That is ... deeply weird.

Could you remove your .doit.db and try again?


I did before trying a second time.

The directory sits there without any doit database and it gives me the same result.
As you say, "deeply weird".

Chris Warrick

unread,
May 21, 2020, 9:11:23 AM5/21/20
to Nikola—Discuss
Can you try upgrading/reinstalling doit and cloudpickle?
> --
> You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/27e9727e-237e-4d5c-9859-82dc61bc549b%40googlegroups.com.



--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

Marcelo Huerta

unread,
May 21, 2020, 10:10:26 AM5/21/20
to nikola-...@googlegroups.com
Chris Warrick escribió el 21/05/2020 a las 10:11:
> Can you try upgrading/reinstalling doit and cloudpickle?

After upgrading, I got a warning about Luxon replacing Moment.js, which I
fixed, and then a

> AttributeError: module 'time' has no attribute 'clock'

from Mako, which I then also upgraded.

Then there was another error about tornado.web not having the attribute
"asynchronous", but that came from the "tags" plugin which I removed.

I rebuilt my site correctly now. Thanks.

--
o-=< Marcelo >=-o


Reply all
Reply to author
Forward
0 new messages