Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The error about "string is too long" #305

Open
Zhighway777 opened this issue Oct 10, 2024 · 0 comments
Open

The error about "string is too long" #305

Zhighway777 opened this issue Oct 10, 2024 · 0 comments

Comments

@Zhighway777
Copy link

Zhighway777 commented Oct 10, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant