Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Runtime error

Reply
Thread Tools

Runtime error

 
 
Sebastian
Guest
Posts: n/a
 
      10-28-2010
Hi all,

I am new to python and I don't know how to fix this error. I only try to
execute python (or a cgi script) and I get an ouptu like

[...]
'import site' failed; traceback:
Traceback (most recent call last):
File "/usr/lib/python2.6/site.py", line 513, in <module>
main()
File "/usr/lib/python2.6/site.py", line 496, in main
known_paths = addsitepackages(known_paths)
File "/usr/lib/python2.6/site.py", line 288, in addsitepackages
addsitedir(sitedir, known_paths)
File "/usr/lib/python2.6/site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib/python2.6/site.py", line 155, in addpackage
exec line
File "<string>", line 1, in <module>
File "/usr/lib/python2.6/site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib/python2.6/site.py", line 155, in addpackage
exec line
File "<string>", line 1, in <module>
File "/usr/lib/python2.6/site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib/python2.6/site.py", line 155, in addpackage
exec line
[...]
File "/usr/lib/python2.6/site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib/python2.6/site.py", line 155, in addpackage
exec line
File "<string>", line 1, in <module>
File "/usr/lib/python2.6/site.py", line 175, in addsitedir
sitedir, sitedircase = makepath(sitedir)
File "/usr/lib/python2.6/site.py", line 76, in makepath
dir = os.path.abspath(os.path.join(*paths))
RuntimeError: maximum recursion depth exceeded


What is going wrong with my python install? What do I have to change?

Thanks,
Sebastian
 
Reply With Quote
 
 
 
 
Peter Pearson
Guest
Posts: n/a
 
      10-29-2010
On Thu, 28 Oct 2010 18:26:49 +0200, Sebastian <(E-Mail Removed)> wrote:
> Hi all,
>
> I am new to python and I don't know how to fix this error. I only try to
> execute python (or a cgi script) and I get an ouptu like
>
> [...]
> 'import site' failed; traceback:
> Traceback (most recent call last):
> File "/usr/lib/python2.6/site.py", line 513, in <module>
> main()
> File "/usr/lib/python2.6/site.py", line 496, in main
> known_paths = addsitepackages(known_paths)
> File "/usr/lib/python2.6/site.py", line 288, in addsitepackages
> addsitedir(sitedir, known_paths)
> File "/usr/lib/python2.6/site.py", line 185, in addsitedir
> addpackage(sitedir, name, known_paths)
> File "/usr/lib/python2.6/site.py", line 155, in addpackage
> exec line
> File "<string>", line 1, in <module>
> File "/usr/lib/python2.6/site.py", line 185, in addsitedir
> addpackage(sitedir, name, known_paths)
> File "/usr/lib/python2.6/site.py", line 155, in addpackage
> exec line
> File "<string>", line 1, in <module>
> File "/usr/lib/python2.6/site.py", line 185, in addsitedir
> addpackage(sitedir, name, known_paths)
> File "/usr/lib/python2.6/site.py", line 155, in addpackage
> exec line
> [...]
> File "/usr/lib/python2.6/site.py", line 185, in addsitedir
> addpackage(sitedir, name, known_paths)
> File "/usr/lib/python2.6/site.py", line 155, in addpackage
> exec line
> File "<string>", line 1, in <module>
> File "/usr/lib/python2.6/site.py", line 175, in addsitedir
> sitedir, sitedircase = makepath(sitedir)
> File "/usr/lib/python2.6/site.py", line 76, in makepath
> dir = os.path.abspath(os.path.join(*paths))
> RuntimeError: maximum recursion depth exceeded
>
>
> What is going wrong with my python install? What do I have to change?


While we're waiting for the smart guys to notice your plea,
it will help if you identify your operating system and
show the command that you used to execute Python. The
parenthetical "or a cgi script" is mysterious to me.

--
To email me, substitute nowhere->spamcop, invalid->net.
 
Reply With Quote
 
 
 
 
John Machin
Guest
Posts: n/a
 
      10-30-2010
On Oct 29, 3:26*am, Sebastian <(E-Mail Removed)> wrote:
> Hi all,
>
> I am new to python and I don't know how to fix this error. I only try to
> execute python (or a cgi script) and I get an ouptu like
>
> [...]
> 'import site' failed; traceback:
> Traceback (most recent call last):
> File "/usr/lib/python2.6/site.py", line 513, in <module>
> main()
> File "/usr/lib/python2.6/site.py", line 496, in main
> known_paths = addsitepackages(known_paths)
> File "/usr/lib/python2.6/site.py", line 288, in addsitepackages
> addsitedir(sitedir, known_paths)
> File "/usr/lib/python2.6/site.py", line 185, in addsitedir
> addpackage(sitedir, name, known_paths)
> File "/usr/lib/python2.6/site.py", line 155, in addpackage
> exec line
> File "<string>", line 1, in <module>
> File "/usr/lib/python2.6/site.py", line 185, in addsitedir
> addpackage(sitedir, name, known_paths)
> File "/usr/lib/python2.6/site.py", line 155, in addpackage
> exec line
> File "<string>", line 1, in <module>
> File "/usr/lib/python2.6/site.py", line 185, in addsitedir
> addpackage(sitedir, name, known_paths)
> File "/usr/lib/python2.6/site.py", line 155, in addpackage
> exec line
> [...]
> File "/usr/lib/python2.6/site.py", line 185, in addsitedir
> addpackage(sitedir, name, known_paths)
> File "/usr/lib/python2.6/site.py", line 155, in addpackage
> exec line
> File "<string>", line 1, in <module>
> File "/usr/lib/python2.6/site.py", line 175, in addsitedir
> sitedir, sitedircase = makepath(sitedir)
> File "/usr/lib/python2.6/site.py", line 76, in makepath
> dir = os.path.abspath(os.path.join(*paths))
> RuntimeError: maximum recursion depth exceeded
>
> What is going wrong with my python install? What do I have to change?


Reading the code for site.py, it looks like you may have a .pth file
that is self-referential (or a chain or 2 or more .pth files!) that
are sending you around in a loop. If you are having trouble
determining what files are involved, you could put some print
statements in your site.py at about lines 155 and 185 (which appear to
be in the loop, according to the traceback) or step through it with a
debugger.

 
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
Help: Runtime Error - Server Error in '/' Application Kevin Farless ASP .Net 13 10-03-2007 09:48 AM
Runtime.exec(String[]) Doesn't Always Work, bBut Runtime.exec(String) Does Hal Vaughan Java 11 05-22-2006 04:49 PM
Server Error in '/' Application. Runtime Error. Krunom Ancini ASP .Net 2 03-01-2005 10:07 AM
where can i find the lines of error in Runtime Error Page? Yongsub Eric Shin ASP .Net 7 01-14-2004 12:29 AM
fatal error CS0007: Unexpected common language runtime initialization error -- Polo Lee ASP .Net 0 07-07-2003 01:24 AM



Advertisments