Cannot launch qabro on a platform without pci

Bug #1910193 reported by Patrick Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bugit
Fix Released
High
Pierre Equoy

Bug Description

I was trying to use qabro on my arm64 uc20 project. Our project does not have a PCI bus in design.
When launching qabro with the following command, it raises an error.

patliu@Ambarella:~$ snap install qabro --devmode
qabro 0.14 from Pierre Equoy (pieq) installed
patliu@Ambarella:~$ qabro
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
Traceback (most recent call last):
  File "/snap/qabro/135/bin/qabro", line 33, in <module>
    sys.exit(load_entry_point('qabro==0.14', 'console_scripts', 'qabro')())
  File "/snap/qabro/135/lib/python3.6/site-packages/qabro/__init__.py", line 65, in main
    tags=args.tags)
  File "/snap/qabro/135/lib/python3.6/site-packages/qabro/__init__.py", line 72, in start_ui
    tags=tags.lower())
  File "/snap/qabro/135/lib/python3.6/site-packages/qabro/ui.py", line 49, in __init__
    std_info = AttachmentAssistant.get_standard_info()
  File "/snap/qabro/135/lib/python3.6/site-packages/qabro/bug_assistant.py", line 386, in get_standard_info
    lspci_output = (subprocess.check_output(['lspci', '-nn'])
  File "/snap/qabro/135/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/snap/qabro/135/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['lspci', '-nn']' returned non-zero exit status 1.

[Failure rate]
100%

[Additional information]
Hardware: ARM 64
Image: uc20 for our project
CPU: 4 core, Cortex A53
RAM: 1GB DDR4
Kernel: 5.4

Related branches

Revision history for this message
Pierre Equoy (pieq) wrote :

According to OP, the device in question does not have a PCI Bus, which results to lspci not being able to run.

Indeed, if trying to run lspci from within the snap, we get the same error:

$ snap run --shell qabro
user@hostname:/home/user$ lspci
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.

QAbro has to be made more flexible and not fail if lspci returns an error.

Pierre Equoy (pieq)
Changed in qabro:
milestone: none → 0.15
assignee: nobody → Pierre Equoy (pieq)
status: New → Confirmed
importance: Undecided → High
Pierre Equoy (pieq)
Changed in qabro:
status: Confirmed → Fix Committed
Pierre Equoy (pieq)
Changed in qabro:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.