Finding the file referred to in a Python traceback

Sion Arrowsmith siona at chiark.greenend.org.uk
Thu Sep 28 11:12:30 EDT 2006


 <metaperl.etc at gmail.com> wrote:
>In this traceback, the path to 3 different SQL Alchemy source files is
>a relative directory. However, no such directory is below my current
>working directory.
>
>Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "conf/__init__.py", line 34, in __init__
>    self.table = tables(self.metadata)
>  File "conf/__init__.py", line 38, in __init__
>    self.users         = Table('Users', metadata, autoload=True)
>  File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/schema.py", line
>138, in __call__
[etc]
>>>> print sys.path
>['', '/sw/lib/python2.4/site-packages/Dabo-0.6.5s-py2.4.egg',
>'/sw/lib/python2.4/site-packages/SQLAlchemy-0.2.8dev_r1898-py2.4.egg',
[etc]

Paths of files contained in eggs aren't always helpful (as was pointed
out to me recently). If you unzip the SQLAlchemy egg (eggs are just
zip files) (to somewhere other than site-packages if you want to avoid
confusion) you'll probably find schema.py etc. in there.

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list