[Bug 1077999] Re: python imported wrong file

Debra Virden teddydlv at yahoo.com
Sun Mar 3 22:15:33 UTC 2013


** Description changed:

- Someone asked me to modify keepnote .  I unpacked the gz file, changed directory to the top level keepnote directory created by tar, then checked to see if keepnote is installed on my system with the command
- keepnote
- keepnote happens to be written in python2 and there are a bunch of python files in the directory I described.  keepnote is not installed on my system.  command-not-found imported a file from the local directory and failed.  command-not-found clearly won't work with every python2 file, and shouldn't load files from the local directory anyway.  I suppose this problem might be pervasive.
+ Someone asked me to modify keepnote.  I unpacked the gz file, changed directory to the top level keepnote directory created by tar, then checked to see if keepnote is installed on my system with the command
+ keepnote.
+ Keepnote happens to be written in python2 and there are a bunch of python files in the directory I described.  keepnote is not installed on my system. Command-not-found imported a file from the local directory and failed. Command-not-found clearly won't work with every python2 file, and shouldn't load files from the local directory anyway.  I suppose this problem might be pervasive.
  
  $ keepnote
  Sorry, command-not-found has crashed! Please file a bug report at:
  https://bugs.launchpad.net/command-not-found/+filebug
  Please include the following information with the report:
  
  command-not-found version: 0.3
  Python version: 3.2.3 final 0
  Distributor ID:	Ubuntu
  Description:	Ubuntu 12.10
  Release:	12.10
  Codename:	quantal
  Exception information:
  
  invalid syntax (tarfile.py, line 61)
  Traceback (most recent call last):
-   File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
-     callback()
-   File "/usr/lib/command-not-found", line 86, in main
-     cnf = CommandNotFound(options.data_dir)
-   File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 130, in __init__
-     self.sources_list = self._getSourcesList()
-   File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 170, in _getSourcesList
-     from aptsources.sourceslist import SourcesList
-   File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 32, in <module>
-     import shutil
-   File "/usr/lib/python3.2/shutil.py", line 14, in <module>
-     import tarfile
-   File "/tmp/keepnote-0.7.8/keepnote/tarfile.py", line 61
-     raise ImportError, "tarfile does not work for platform==mac"
-                      ^
+   File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
+     callback()
+   File "/usr/lib/command-not-found", line 86, in main
+     cnf = CommandNotFound(options.data_dir)
+   File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 130, in __init__
+     self.sources_list = self._getSourcesList()
+   File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 170, in _getSourcesList
+     from aptsources.sourceslist import SourcesList
+   File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 32, in <module>
+     import shutil
+   File "/usr/lib/python3.2/shutil.py", line 14, in <module>
+     import tarfile
+   File "/tmp/keepnote-0.7.8/keepnote/tarfile.py", line 61
+     raise ImportError, "tarfile does not work for platform==mac"
+                      ^
  SyntaxError: invalid syntax
  
  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: command-not-found 0.3ubuntu5
  ProcVersionSignature: Ubuntu 3.5.0-18.29-generic 3.5.7
  Uname: Linux 3.5.0-18-generic x86_64
  ApportVersion: 2.6.1-0ubuntu6
  Architecture: amd64
  Date: Mon Nov 12 10:59:25 2012
  InstallationDate: Installed on 2010-12-03 (709 days ago)
  InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
  MarkForUpload: True
  PackageArchitecture: all
  ProcEnviron:
-  TERM=dumb
-  PATH=(custom, no user)
-  XDG_RUNTIME_DIR=<set>
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
+  TERM=dumb
+  PATH=(custom, no user)
+  XDG_RUNTIME_DIR=<set>
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
  SourcePackage: command-not-found
  UpgradeStatus: Upgraded to quantal on 2012-10-23 (19 days ago)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to command-not-found in Ubuntu.
https://bugs.launchpad.net/bugs/1077999

Title:
  python imported wrong file

Status in “command-not-found” package in Ubuntu:
  New

Bug description:
  Someone asked me to modify keepnote.  I unpacked the gz file, changed directory to the top level keepnote directory created by tar, then checked to see if keepnote is installed on my system with the command
  keepnote.
  Keepnote happens to be written in python2 and there are a bunch of python files in the directory I described.  keepnote is not installed on my system. Command-not-found imported a file from the local directory and failed. Command-not-found clearly won't work with every python2 file, and shouldn't load files from the local directory anyway.  I suppose this problem might be pervasive.

  $ keepnote
  Sorry, command-not-found has crashed! Please file a bug report at:
  https://bugs.launchpad.net/command-not-found/+filebug
  Please include the following information with the report:

  command-not-found version: 0.3
  Python version: 3.2.3 final 0
  Distributor ID:	Ubuntu
  Description:	Ubuntu 12.10
  Release:	12.10
  Codename:	quantal
  Exception information:

  invalid syntax (tarfile.py, line 61)
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
      callback()
    File "/usr/lib/command-not-found", line 86, in main
      cnf = CommandNotFound(options.data_dir)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 130, in __init__
      self.sources_list = self._getSourcesList()
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 170, in _getSourcesList
      from aptsources.sourceslist import SourcesList
    File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 32, in <module>
      import shutil
    File "/usr/lib/python3.2/shutil.py", line 14, in <module>
      import tarfile
    File "/tmp/keepnote-0.7.8/keepnote/tarfile.py", line 61
      raise ImportError, "tarfile does not work for platform==mac"
                       ^
  SyntaxError: invalid syntax

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: command-not-found 0.3ubuntu5
  ProcVersionSignature: Ubuntu 3.5.0-18.29-generic 3.5.7
  Uname: Linux 3.5.0-18-generic x86_64
  ApportVersion: 2.6.1-0ubuntu6
  Architecture: amd64
  Date: Mon Nov 12 10:59:25 2012
  InstallationDate: Installed on 2010-12-03 (709 days ago)
  InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
  MarkForUpload: True
  PackageArchitecture: all
  ProcEnviron:
   TERM=dumb
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: command-not-found
  UpgradeStatus: Upgraded to quantal on 2012-10-23 (19 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1077999/+subscriptions




More information about the foundations-bugs mailing list