The basic.py used in the testplan

** Summary changed:

- pycallgraph crashed with AttributeError in Noble
+ [SRU] pycallgraph crashed with AttributeError

** Description changed:

- pycallgraph fails to run with the error:
+ [ Impact ]
  
- $ pycallgraph 
+ pycallgraph is completely unusable and crashes immediately when executed
+ by the user.
+ 
+ 
+ $ pycallgraph --help
  Traceback (most recent call last):
    File "/usr/bin/pycallgraph", line 11, in <module>
      import pycallgraph as __pycallgraph
    File "/usr/lib/python3/dist-packages/pycallgraph/__init__.py", line 11, in 
<module>
      from .pycallgraph import PyCallGraph
    File "/usr/lib/python3/dist-packages/pycallgraph/pycallgraph.py", line 3, 
in <module>
      from .output import Output
    File "/usr/lib/python3/dist-packages/pycallgraph/output/__init__.py", line 
3, in <module>
      from .output import Output
    File "/usr/lib/python3/dist-packages/pycallgraph/output/output.py", line 3, 
in <module>
      from distutils.spawn import find_executable
+ ModuleNotFoundError: No module named 'distutils'
+ 
+ 
+ [ Test Plan ]
+ 
+ install python3-pycallgraph.
+ 
+ As a basic test, execute "pycallgraph --help"
+ 
+ If the package is not fixed,it will fail with the above error.
+ With the fixed package, it will display the help menu.
+ 
+ As a more complete test:
+ 
+ copy the attached basic.py and use the command:
+ 
+ pycallgraph graphviz basic.py
+ 
+ It will create two png files "basic.png" and "pycallgraph.png".
+ 
+ 
+ [ Where problems could occur ]
+ 
+ The 'distutils' module is not available in Python3.12. 'distutils' was used 
previously to find the executable and was also used to get the path of the 
python lib. Now, its being replaced with 'shutil' and using 'which' to find the 
executable. And, 'sysconfig' is used to get the path of the python lib.
+ In the worst case, if 'which' or 'sysconfig' fails to find the path then the 
user will still see pycallgraph is failing but with a different error message.
+ 
+ 
+ [ Other Info ]
+ 
+ It has been fixed in Debian and so Oracular is also fixed now.
+ 
+ [ Original Bug Description ]
+ 
+ pycallgraph fails to run with the error:
+ 
+ $ pycallgraph
+ Traceback (most recent call last):
+   File "/usr/bin/pycallgraph", line 11, in <module>
+     import pycallgraph as __pycallgraph
+   File "/usr/lib/python3/dist-packages/pycallgraph/__init__.py", line 11, in 
<module>
+     from .pycallgraph import PyCallGraph
+   File "/usr/lib/python3/dist-packages/pycallgraph/pycallgraph.py", line 3, 
in <module>
+     from .output import Output
+   File "/usr/lib/python3/dist-packages/pycallgraph/output/__init__.py", line 
3, in <module>
+     from .output import Output
+   File "/usr/lib/python3/dist-packages/pycallgraph/output/output.py", line 3, 
in <module>
+     from distutils.spawn import find_executable
  ModuleNotFoundError: No module named 'distutils'
  
  ProblemType: Crash
  DistroRelease: Ubuntu 24.04
  Package: python3-pycallgraph 1.1.3-2
  ProcVersionSignature: Ubuntu 6.8.0-22.22-generic 6.8.1
  Uname: Linux 6.8.0-22-generic x86_64
  ApportVersion: 2.28.0-0ubuntu1
  Architecture: amd64
  CasperMD5CheckResult: pass
  CrashCounter: 1
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Apr 17 21:46:49 2024
  ExecutablePath: /usr/bin/pycallgraph
  InstallationDate: Installed on 2024-04-10 (7 days ago)
  InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Beta amd64 (20240410)
  InterpreterPath: /usr/bin/python3.12
  JournalErrors: -- No entries --
  PackageArchitecture: all
  ProcCmdline: /usr/bin/python3 /usr/bin/pycallgraph
  Python3Details: /usr/bin/python3.12, Python 3.12.3, python3-minimal, 
3.12.3-0ubuntu1
  PythonArgs: ['/usr/bin/pycallgraph']
  PythonDetails: N/A
  SourcePackage: pycallgraph
  Title: pycallgraph crashed with AttributeError in strip_argv(): 'Config' 
object has no attribute 'command'
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm cdrom dip lpadmin plugdev sudo users

** Attachment added: "basic.py"
   
https://bugs.launchpad.net/ubuntu/+source/pycallgraph/+bug/2062065/+attachment/5796003/+files/basic.py

** Changed in: pycallgraph (Ubuntu Noble)
     Assignee: Sudip Mukherjee (sudipmuk) => (unassigned)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2062065

Title:
  [SRU] pycallgraph crashed with AttributeError

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pycallgraph/+bug/2062065/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to