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

Exception in creating hpy instance #47

Open
silverwingbug opened this issue Apr 1, 2024 · 1 comment
Open

Exception in creating hpy instance #47

silverwingbug opened this issue Apr 1, 2024 · 1 comment

Comments

@silverwingbug
Copy link

Hi Experts,

Meet an exception in creating hpy instance like below:
2024-04-01T07:21:41Z Wa(180)[+] sha: h=guppy.hpy()
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/init.py", line 38, in hpy
2024-04-01T07:21:41Z Wa(180)[+] sha: return r.guppy.heapy.Use
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 50, in getattr
2024-04-01T07:21:41Z Wa(180)[+] sha: return self._share.getattr(self, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 219, in getattr
2024-04-01T07:21:41Z Wa(180)[+] sha: d = self.getattr2(inter, cache, owner, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 236, in getattr2
2024-04-01T07:21:41Z Wa(180)[+] sha: x = self.getattr_package(inter, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 284, in getattr_package
2024-04-01T07:21:41Z Wa(180)[+] sha: x = self.makeModule(x, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 350, in makeModule
2024-04-01T07:21:41Z Wa(180)[+] sha: return Share(module, self, module.name, Clamp)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 208, in init
2024-04-01T07:21:41Z Wa(180)[+] sha: getattr(inter, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 50, in getattr
2024-04-01T07:21:41Z Wa(180)[+] sha: return self._share.getattr(self, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 219, in getattr
2024-04-01T07:21:41Z Wa(180)[+] sha: d = self.getattr2(inter, cache, owner, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 238, in getattr2
2024-04-01T07:21:41Z Wa(180)[+] sha: x = self.getattr3(inter, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 323, in getattr3
2024-04-01T07:21:41Z Wa(180)[+] sha: pa = getattr(pa, at)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 50, in getattr
2024-04-01T07:21:41Z Wa(180)[+] sha: return self._share.getattr(self, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 219, in getattr
2024-04-01T07:21:41Z Wa(180)[+] sha: d = self.getattr2(inter, cache, owner, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 236, in getattr2
2024-04-01T07:21:41Z Wa(180)[+] sha: x = self.getattr_package(inter, name)
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/etc/Glue.py", line 273, in getattr_package
2024-04-01T07:21:41Z Wa(180)[+] sha: x = import(self.makeName(name))
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/heapy/View.py", line 605, in
2024-04-01T07:21:41Z Wa(180)[+] sha: prime_builtin_types()
2024-04-01T07:21:41Z Wa(180)[+] sha: File "/usr/lib/x/y/lib/python/guppy/heapy/View.py", line 551, in prime_builtin_types
2024-04-01T07:21:41Z Wa(180)[+] sha: if isinstance(t, types):
2024-04-01T07:21:41Z Wa(180)[+] sha: TypeError: isinstance() arg 2 must be a type or tuple of types

To accommodate our platform, I compiled the source to build a manylinux version wheel, then unzip and copy the stuff in the package to the platform for reference.

BR/Amber

@silverwingbug silverwingbug changed the title Exception Exception in creating hpy instance Apr 1, 2024
@zhuyifei1999
Copy link
Owner

Hi I'm so sorry I missed this bug.

You have

2024-04-01T07:21:41Z Wa(180)[+] sha: if isinstance(t, types):

The closest matching line seems to be https://github.com/zhuyifei1999/guppy3/blob/master/guppy/heapy/View.py#L551

            if isinstance(t, type):

it's type instead of types here. What is types for?

Assuming the code was actually type and not types the error message makes no sense, because type itself is a type. But if the code was actually changed from type to types then it would actually refer to a module imported at line 539 and emit the error you saw.

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