Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Finding the file referred to in a Python traceback

Reply
Thread Tools

Finding the file referred to in a Python traceback

 
 
metaperl.etc@gmail.com
Guest
Posts: n/a
 
      09-26-2006
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.

This is problematic for two reasons:
1 - I cannot use XEmacs find-file-at-point to find the file in which
the error is occurring
2 - I am not really sure where the source file is that is causing
problems because tha path could be relative to anything.

--- output ---

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__
File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/engine/base.py",
line 495, in reflecttable
File
"build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/databases/mssql.py", line
426, in reflecttable
TypeError: __init__() takes at most 2 arguments (3 given)
>>> import sys
>>> 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',
'/sw/lib/python24.zip', '/sw/lib/python2.4',
'/sw/lib/python2.4/plat-darwin', '/sw/lib/python2.4/plat-mac',
'/sw/lib/python2.4/plat-mac/lib-scriptpackages',
'/sw/lib/python2.4/lib-tk', '/sw/lib/python2.4/lib-dynload',
'/sw/lib/python2.4/site-packages',
'/sw/lib/python2.4/site-packages/Numeric',
'/sw/lib/python2.4/site-packages/PIL',
'/sw/lib/python2.4/site-packages/gtk-2.0',
'/sw/lib/python2.4/site-packages/pythonutils',
'/sw/lib/python2.4/site-packages/wx-2.6-gtk2-unicode']
>>>


 
Reply With Quote
 
 
 
 
Sion Arrowsmith
Guest
Posts: n/a
 
      09-28-2006
<(E-Mail Removed)> 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 -- http://www.velocityreviews.com/forums/(E-Mail Removed) -- 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"raise (type, value, traceback)" and "raise type, value, traceback" Jack Bates Python 0 05-02-2011 05:23 PM
Can a static function defined in a C file be ever referred (called) externally ? jeniffer C Programming 12 03-29-2006 03:39 PM
Display an HTML object referred to by SQL Server Paul ASP .Net 5 03-16-2006 02:44 PM
Printing a file to a printer &/or changing the device that is referred to by stdout Jody Burgess Python 2 07-17-2004 04:59 AM
Where can I get the dll referred to in this msdn article? Michael Tholkes ASP .Net 2 06-30-2003 11:10 AM



Advertisments