Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.1.2 "no deps" windows package (w/ py.exe) fails with SymPy 0.7.6 #155

Closed
cbm755 opened this issue Dec 1, 2014 · 12 comments
Closed

0.1.2 "no deps" windows package (w/ py.exe) fails with SymPy 0.7.6 #155

cbm755 opened this issue Dec 1, 2014 · 12 comments
Labels

Comments

@cbm755
Copy link
Collaborator

cbm755 commented Dec 1, 2014

py.exe has been working great for me with SymPy 0.7.5. But now it fails using the new
SymPy 0.7.6. See error below.

  1. Strangely, at least one other person has it working! They run
    Windows 8. I'm not sure what Windows I'm using, some sort of terminal
    server, 7 maybe? I've tested with py.exe 2.7.8.9 and 2.7.8.6.
  2. @asmeurer (lead SymPy dev) says:

Hmm, I think py2exe changes some behavior of the interpreter. I've
seen some issues on StackOverflow in the past where it couldn't
compile SymPy, for instance. In this case, it looks like it sets
doc on a method to be None instead of the docstring. This really
looks like a bug in py.exe or py2exe.

  1. [update] bug confirmed on Windows XP and Windows 7 by two different
    people. Windows 8 doesn't seem to have it.
  2. I'll attach a png someone sent me of it working on Windows 8. The
    NameError stuff is just user input errors; it works fine. Below is
    what I get.
Traceback (most recent call last):
  File "py.py", line 904, in <module>
  File "<string>", line 1, in <module>
  File "<string>", line 7, in <module>
  File "<string>", line 4, in _fcn
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\transforms.py",
line 1364, in fourier
_transform
    return FourierTransform(f, x, k).doit(**hints)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\transforms.py",
line 118, in doit
    self.function_variable, self.transform_variable, **hints)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\transforms.py",
line 1307, in _comput
e_transform
    self.__class__._name, **hints)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\transforms.py",
line 196, in wrapper
    res = func(*args, **kwargs)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\transforms.py",
line 1284, in _fourie
r_transform
    F = integrate(a*f*exp(b*I*x*k), (x, -oo, oo))
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\utilities\decorator.py",
line 35, in threaded_f
unc
    return func(expr, *args, **kwargs)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\integrals.py",
line 1232, in integrat
e
    risch=risch, manual=manual)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\integrals.py",
line 467, in doit
    ret = try_meijerg(function, xab)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\integrals.py",
line 444, in try_meije
rg
    res = meijerint_definite(function, x, a, b)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\meijerint.py",
line 1746, in meijerin
t_definite
    res1 = _meijerint_definite_2(f.subs(x, x + c), x)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\meijerint.py",
line 1855, in _meijeri
nt_definite_2
    res = _meijerint_definite_3(g, x)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\meijerint.py",
line 1867, in _meijeri
nt_definite_3
    res = _meijerint_definite_4(f, x)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\meijerint.py",
line 1932, in _meijeri
nt_definite_4
    f1, f2, x, full_pb)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\meijerint.py",
line 898, in _rewrite_
saxena
    g2 = pb(g2)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\integrals\meijerint.py",
line 874, in pb
    per = g.get_period()
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\functions\special\hyper.py",
line 578, in get_p
eriod
    beta = compute(self.bm)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\functions\special\hyper.py",
line 575, in compu
te
    if not Mod((b - l[j]).simplify(), 1):
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\core\expr.py",
line 2922, in simplify
    return simplify(self, ratio, measure)
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\simplify\simplify.py",
line 3671, in simplify
    from sympy.vector import Vector
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\vector\__init__.py",
line 1, in <module>
    from sympy.vector.vector import (Vector, VectorAdd, VectorMul,
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\vector\vector.py",
line 6, in <module>
    from sympy.vector.basisdependent import BasisDependent, \
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\vector\basisdependent.py",
line 9, in <module>
    class BasisDependent(Expr):
  File
"N:\win32\octave-3.8.2\share\octave\packages\octsympy-0.1.1\bin\sympy\vector\basisdependent.py",
line 70, in BasisDep
endent
    evalf.__doc__ += Expr.evalf.__doc__
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'
@cbm755
Copy link
Collaborator Author

cbm755 commented Dec 1, 2014

sym

@maprieto
Copy link
Contributor

Maybe it's helpful for this issue (or not)
error_in_py_with_sympy_0 7 5
but something unusual happens in "simplify" with py.exe and sympy 0.7.5

@cbm755
Copy link
Collaborator Author

cbm755 commented Dec 18, 2014

Thanks @maprieto. That does look like same issue.

  • Can you also reproduce the same problem with fourier_transform?
  • What version of Windows is this?

thanks.

@cbm755
Copy link
Collaborator Author

cbm755 commented Dec 18, 2014

Wait, @maprieto, did you say you see this on 0.7.5? Not 0.7.6?

@maprieto
Copy link
Contributor

fourier_transform works fine with py.exe and sympy 0.7.5 in my octsympy installation (octsympy-windows-oldsympy-0.1.2.zip under Windows XP, version 2003, service pack 3)

@cbm755
Copy link
Collaborator Author

cbm755 commented Dec 18, 2014

Hmm, so I can reproduce this error on 0.7.6 (which is consistent with my original bug).

But on 0.7.5, solve works correctly (as in my original bug).

This is on Windows 7 remote server.

@maprieto: what do you see?

@cbm755
Copy link
Collaborator Author

cbm755 commented Dec 18, 2014

screenshot from 2014-12-18 12 33 59

@maprieto
Copy link
Contributor

I've been misspelling the sympy version. Confirmed both commands work in sympy 0.7.5 and py.exe, but that isn't right for sympy 0.7.6
test_with_py exe

@cbm755
Copy link
Collaborator Author

cbm755 commented Dec 18, 2014

Good, that is consistent with my original bug. Thanks for double-checking.

@manthey
Copy link

manthey commented Jan 4, 2015

The problem with py.exe is that when I created it, I stripped the doc strings from the modules to make it smaller. I didn't realize that it functionally was stripping the doc strings from all import forever more. I've posted a new version of py.exe.

@asmeurer
Copy link

asmeurer commented Jan 5, 2015

Could you make it replace the docstrings with the empty string instead of None?

@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 6, 2015

@asmeurer's suggestion sounds reasonable. Anyway, I'm going to close this as both sympy and octsympy work with @manthey's new 2.7.9.10 release.

Thank you @manthey.

@cbm755 cbm755 closed this as completed in cce1372 Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants