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

Failure when running on ubuntu focal #11

Open
furlongm opened this issue Jun 23, 2021 · 1 comment
Open

Failure when running on ubuntu focal #11

furlongm opened this issue Jun 23, 2021 · 1 comment

Comments

@furlongm
Copy link

Stacktrace:

Traceback (most recent call last):
  File "/usr/local/bin/pcicrawler", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pcicrawler/cli.py", line 292, in main
    exptype = dev.express_type
  File "/usr/local/lib/python3.8/dist-packages/pci_lib/pci_lib.py", line 42, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/usr/local/lib/python3.8/dist-packages/pci_lib/pci_lib.py", line 553, in express_type
    express = find_capability(config, PCI_CAP_EXPRESS)
  File "/usr/local/lib/python3.8/dist-packages/pci_lib/pci_lib.py", line 153, in find_capability
    cap_id = read_u8(config, pos)
  File "/usr/local/lib/python3.8/dist-packages/pci_lib/pci_lib.py", line 122, in read_u8
    r, = struct.unpack('B', data[offset:offset + 1])
  File "/usr/local/lib/python3.8/dist-packages/pci_lib/pci_lib.py", line 299, in __getitem__
    return b''.join(int2byte(b) for b in data)
  File "/usr/local/lib/python3.8/dist-packages/pci_lib/pci_lib.py", line 299, in <genexpr>
    return b''.join(int2byte(b) for b in data)
struct.error: required argument is not an integer```
@antgun42
Copy link

antgun42 commented Jun 7, 2023

I ran into the same issue when trying to use pcicrawler in a non-privileged container, running in privileged mode solves the problem.

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