Skip to content

ipyparallel TypeError: an integer is required (got type bytes) when running on python3.8.2rc1 #396

Closed

Description

@kinglionsz

When i running script with python3.8.2rc1 using ipyparallel get TypeError: an integer is required (got type bytes)

Here's the log:

ipcluster engines --n=4
2020-02-25 17:22:41.355 [IPClusterEngines] IPython cluster: started
2020-02-25 17:22:41.355 [IPClusterEngines] Starting engines with [daemon=False]
2020-02-25 17:22:41.364 [IPClusterEngines] Starting 4 Engines with LocalEngineSetLauncher
2020-02-25 17:23:11.698 [IPClusterEngines] Engines appear to have started successfully

python -c "import ipyparallel as ipp; c=ipp.Client(); print(c[:].apply_sync(lambda : 'Hello, World'))"

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.8/dist-packages/ipyparallel/client/view.py", line 226, in apply_sync
return self._really_apply(f, args, kwargs, block=True)
File "", line 2, in _really_apply
File "/usr/local/lib/python3.8/dist-packages/ipyparallel/client/view.py", line 52, in sync_results
ret = f(self, *args, **kwargs)
File "", line 2, in _really_apply
File "/usr/local/lib/python3.8/dist-packages/ipyparallel/client/view.py", line 37, in save_ids
ret = f(self, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/ipyparallel/client/view.py", line 576, in _really_apply
return ar.get()
File "/usr/local/lib/python3.8/dist-packages/ipyparallel/client/asyncresult.py", line 169, in get
raise self.exception()
File "/usr/local/lib/python3.8/dist-packages/ipyparallel/client/asyncresult.py", line 228, in _resolve_result
results = error.collect_exceptions(results, self._fname)
File "/usr/local/lib/python3.8/dist-packages/ipyparallel/error.py", line 233, in collect_exceptions
raise e
File "/usr/local/lib/python3.8/dist-packages/ipyparallel/error.py", line 231, in collect_exceptions
raise CompositeError(msg, elist)
ipyparallel.error.CompositeError: one or more exceptions from call to method:
[0:apply]: TypeError: an integer is required (got type bytes)
[1:apply]: TypeError: an integer is required (got type bytes)
[2:apply]: TypeError: an integer is required (got type bytes)
[3:apply]: TypeError: an integer is required (got type bytes)

version and platform:

python -c "import ipyparallel as ipp; c=ipp.Client(); print('ipyparallel version: ', ipp.version)"
ipyparallel version: 6.2.4

python -c "import os;import sys;print('\n',os.path);print('You are using Python ',sys.version)"

<module 'posixpath' from '/usr/lib/python3.8/posixpath.py'>
You are using Python 3.8.2rc1 (default, Feb 12 2020, 00:06:56)
[GCC 9.2.1 20200203]

uname -a
Linux DESKTOP-XXXXXXX 4.19.84-microsoft-standard #1 SMP Wed Nov 13 11:44:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Focal Fossa (development branch)
Release: 20.04
Codename: focal

expecting:

python -c "import ipyparallel as ipp; c=ipp.Client(); print(c[:].apply_sync(lambda : 'Hello, World'))"
['Hello, World', 'Hello, World', 'Hello, World', 'Hello, World']

Thanks.

Activity

  1. kinglionsz commented on Feb 26, 2020

    @kinglionsz
    Author

    which I use python 3.7.6 is ok.

    python -c "import ipyparallel as ipp; c=ipp.Client(); print(c[:].apply_sync(lambda : 'Hello, World'))"
    ['Hello, World', 'Hello, World', 'Hello, World', 'Hello, World']

    Which is what we expect!

  2. renefritze commented on Mar 3, 2020

    @renefritze

    I'm running into the same issue in a library that uses ipyparallel. My guess is that it is related to this change mentioned in the 3.8 changelog:

    types.CodeType has a new parameter in the second position of the constructor (posonlyargcount) to support positional-only arguments defined in PEP 570. The first argument (argcount) now represents the total number of positional arguments (including positional-only arguments). The new replace() method of types.CodeType can be used to make the code future-proof.

    Which is used here I guess?

  3. kinglionsz commented on Mar 3, 2020

    @kinglionsz
    Author

    Thank you for your time and thank you very much. @renefritze 👍👍👍

  4. basnijholt commented on Apr 9, 2020

    @basnijholt
    Contributor

    This issue has been fixed since 12 Aug 2019 #379. However, 6.2.4 was released on 13 May 2019.

  5. renefritze commented on Apr 10, 2020

    @renefritze

    This issue has been fixed since 12 Aug 2019 #379. However, 6.2.4 was released on 13 May 2019.

    Do I understand you correctly that you're saying that actual issue here is that the fix remains unreleased?

  6. basnijholt commented on Apr 10, 2020

    @basnijholt
    Contributor

    @renefritze, unfortunately, yes!

    @minrk, would you be so kind as to release a new version 😇

  7. basnijholt commented on Apr 20, 2020

    @basnijholt
    Contributor

    This should be fixed now by e529d29, the release of 6.2.5 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions