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

PyPy3 errors: TypeError: expected integer, got NoneType object #60

Open
sbraz opened this issue May 14, 2021 · 3 comments
Open

PyPy3 errors: TypeError: expected integer, got NoneType object #60

sbraz opened this issue May 14, 2021 · 3 comments

Comments

@sbraz
Copy link
Contributor

sbraz commented May 14, 2021

When I run tests with PyPy3, they pass but I see a lot of these errors. Is PyPy3 officially supported?
For instance:

$ pypy3 -m unittest discover -k test_default_set
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
TypeError: expected integer, got NoneType object
.
----------------------------------------------------------------------
Ran 1 test in 0.904s

OK
@mk-fg
Copy link
Owner

mk-fg commented May 14, 2021

Don't think I've ever tried running the thing on it, but don't see why it shouldn't work there, and unless it needs some major rewrite, can probably fix bugs there.

That output without proper exception is weird though, like a print() forgotten somewhere :)

@sbraz
Copy link
Contributor Author

sbraz commented May 14, 2021

I suspect something related to ctypes but I don't really know what.

@mk-fg
Copy link
Owner

mk-fg commented May 14, 2021

Yeah, probably.

Putting print()s around this very first ctypes call:

try: c.pa.context_connect(self._ctx, self.server, flags, None)
except c.pa.CallError: self.connected = False

...already traps one of those.

But looking at wrappers and replacing None there with POINTER(c_int)() doesn't seem to help.
And adding a bunch more prints seem to narrow it down to "somewhere in pypy3 ctypes", so idk, maybe they'll fix it upstream, or maybe there's some pypy-specific debug option enabled by design producing these, but too lazy to look into these within pypy code or report it there.

If someone has any idea where these things come from, please leave a comment.

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

2 participants