On Sat, Jul 20, 2013 at 5:40 AM, Mary Clark <mary.spritel...@gmail.com> wrote: > >> >> Looks like the "c" in list(c) is a Python int, so if you do list(c), >> it returns an error. What is this line supposed to do? >> >> Does this happen when you run this doctest locally? That's the best >> way to debug it. >> >> Ondrej > > > Unfortunately, I don't seem to be able to run the doctest locally. When I > try, the following is displayed: > > > sympy/liealgebras/type_a.py[?] Failed to import > [FAIL] > > I don't understand this error or how to fix it, so currently I am reliant on > Travis to run the doctests. > > On the topic of the error: when I run type(c) to test the type, it returns > str. c is args, it's the input. so c is "A4" or "A3" or whatever. I guess > I don't understand why the doctest gives this error, if the actually code > runs fine, if that makes sense. Surely if c was an int, the tests of type_A > would fail as well, if that makes sense. >> >>
One thing I do (and I think is good practice in general) is that if you know you want inputs n and c to be int and str, put n = int(n) c = str(c) at the top of your code. Regarding sympy/liealgebras/type_a.py[?] Failed to import are there other modules in liealgebras which are loaded, but the module type_a is not? Also, if this is during a test, so from a command in the tests subdirectory, try inserting print statements. For example, in the ntheory test module, between from sympy.ntheory.factor_ import smoothness, smoothness_p from sympy.ntheory.generate import cycle_length insert a print from sympy.ntheory.factor_ import smoothness, smoothness_p print "Hi Mary" from sympy.ntheory.generate import cycle_length See where the failure lies. There are lots of debugging tools around. I don't use any of them. I just insert print statements. *Lots* of them:-) Divide and conquer! >> > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sympy+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@googlegroups.com. > Visit this group at http://groups.google.com/group/sympy. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.