Skip to content

The error about "string is too long" #305

Open
@Zhighway777

Description

@Zhighway777

My python version is 3.10.12
pytest version : 8.2.1
execnet Version: 2.1.1
The versions are both the lastest.

When I run the command: pytest -k mykey -n 16, I got the error as follows:

INTERNALERROR> E                 raise DumpError(error)
INTERNALERROR> E             execnet.gateway_base.DumpError: string is too long
INTERNALERROR> E           assert False
INTERNALERROR> 

I checked the source code in gateway_base.py and find that when the byte_ > FOUR_BYTE_INT_MAX , there will raise a DumpError.

 def _write_int4(
        self, i: int, error: str = "int must be less than %i" % (FOUR_BYTE_INT_MAX,)
    ) -> None:
        if i > FOUR_BYTE_INT_MAX:
            raise DumpError(error)
        self._write(struct.pack("!i", i))

I tried to add the int8 bytecodes for long string, but it doesn't work.

How should I fix this bug?

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