thegooglecodearchive / mpmath

Automatically exported from code.google.com/p/mpmath
Other
0 stars 0 forks source link

Fix exception after having run all tests #181

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install mpmath via svn, e.g. svn checkout
http://mpmath.googlecode.com/svn/trunk/ mpmath

2. cd mpmath; python setup.py install --prefix=$HOME/local
3. python

What is the expected output? What do you see instead?
Python 2.6.2 (r262:71600, Oct 24 2009, 03:15:21)
[GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mpmath
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/home/nwagner/local/lib/python2.6/site-packages/mpmath/__init__.py", line
5, in <module>
    from ctx_fp import FPContext
  File "/home/nwagner/local/lib/python2.6/site-packages/mpmath/ctx_fp.py",
line 1, in <module>
    from ctx_base import StandardBaseContext
  File
"/home/nwagner/local/lib/python2.6/site-packages/mpmath/ctx_base.py", line
3, in <module>
    from functions.functions import SpecialFunctions
ImportError: No module named functions.functions

What version of the product are you using?

On what operating system?
opensuse 11.2 linux x86_64

Please provide any additional information below.

Original issue reported on code.google.com by nils...@googlemail.com on 2 Feb 2010 at 6:28

GoogleCodeExporter commented 9 years ago
setup.py wasn't up to date.

Does it work now?

Original comment by fredrik....@gmail.com on 3 Feb 2010 at 1:02

GoogleCodeExporter commented 9 years ago
Works for me now. I got however this exception when running the tests (using
mpmath.runtests()):

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mpmath/__init__.py", line 352, in runtests
    tests.testit(importdir, testdir)
  File "mpmath/tests/runtests.py", line 140, in testit
    sys.path.remove(importdir)
ValueError: list.remove(x): x not in list

Original comment by Vinzent.Steinberg@gmail.com on 3 Feb 2010 at 9:14

GoogleCodeExporter commented 9 years ago
This is because for some reason importdir misses '/mpmath/tests' at the end.

Original comment by Vinzent.Steinberg@gmail.com on 3 Feb 2010 at 9:18

GoogleCodeExporter commented 9 years ago
Does this indicate a problem or can we just wrap the cleanup code in try-except?

Original comment by fredrik....@gmail.com on 3 Feb 2010 at 8:52

GoogleCodeExporter commented 9 years ago
It's not really a problem, sys.path might be "messy" concerning 1 entry 
afterwards. 
I just don't understand why this happens.

If we add a try block we just hide the exception.

Original comment by Vinzent.Steinberg@gmail.com on 3 Feb 2010 at 11:08

GoogleCodeExporter commented 9 years ago
The question is if it's just some spurious effect, or whether there is some 
problem
with the paths that could affect other things.

Original comment by fredrik....@gmail.com on 4 Feb 2010 at 12:40

GoogleCodeExporter commented 9 years ago
Fixed in trunk.

Original comment by nils...@googlemail.com on 22 Jun 2010 at 5:05

GoogleCodeExporter commented 9 years ago
Ticket can be closed.

Original comment by nils...@googlemail.com on 14 Mar 2012 at 7:58