Comment 1 for bug 951305

Revision history for this message
Noam Yorav-Raphael (noamraph) wrote : Re: Variables: File "/usr/share/dreampie/dreampielib/gui/__init__.py", line 556, check_autocomplete(self=DreamPie(path..."window_main"), last_char='.') {'False': False, 'True': True, 'is_auto': [], 'complete': [], 'self.autocomplete.show_completions': <bound method Autocomplete.show_completions of <dreampielib.gui.autocomplete.Autocomplete object at 0x23ff1d0>>} File "/usr/share/dreampie/dreampielib/gui/autocomplete.py", line 75, show_completions(self=<dreampi...x23ff1d0>, is_auto=True, complete=False) {'index': 692, 'is_auto': True, 'res': [], 'hp': <dreampielib.gui.hyper_parser.HyperParser object at 0x2418390>, 'text': u'def kinematics():\n print "Here are your equations:"\n print "1: xf - xi = Vot + 1/2<a>t^2"\n print "2: Vf^2 = Vo^2 +2<a><xf-xi>"\n print "3: Vf = Vo + <a>t"\n print "4: xf - xi = ((Vf-Vo)/2)*t"\n choice = raw_input("which equation do you want to use? ")\n choice = int(choice)\n if choice == 1:\n x = raw_input("which variable do you want to solve for? ")\n if x == "xf":\n xi = raw_input("enter xi ")\n xi = int(xi)\n Vo = raw_input("enter the initial velocity ")\n Vo = int(Vo)\n t = raw_input("enter t ")\n t = int(t)\n a = "enter the acceleration (careful..\n ', 'self._complete_attributes': <bound method Autocomplete._complete_attributes of <dreampielib.gui.autocomplete.Autocomplete object at 0x23ff1d0>>} File "/usr/share/dreampie/dreampielib/gui/autocomplete.py", line 136, _complete_attributes(self=<dreampi...x23ff1d0>, text=u'def ki... ', index=692, hp=<dreampi...x2418390>, is_auto=True) {'hp.get_expression': <bound method HyperParser.get_expression of <dreampielib.gui.hyper_parser.HyperParser object at 0x2418390>>, 'comp_what': []} File "/usr/share/dreampie/dreampielib/gui/hyper_parser.py", line 141, get_expression(self=<dreampi...x2418390>) {'ValueError': <type 'exceptions.ValueError'>} Traceback (most recent call last): File "/usr/share/dreampie/dreampielib/gui/__init__.py", line 556, in check_autocomplete self.autocomplete.show_completions(is_auto=True, complete=False) File "/usr/share/dreampie/dreampielib/gui/autocomplete.py", line 75, in show_completions res = self._complete_attributes(text, index, hp, is_auto) File "/usr/share/dreampie/dreampielib/gui/autocomplete.py", line 136, in _complete_attributes comp_what = hp.get_expression() File "/usr/share/dreampie/dreampielib/gui/hyper_parser.py", line 141, in get_expression raise ValueError("get_expression should only be called if index "\ ValueError: get_expression should only be called if index is inside a code.

Thanks for the report!

I'm sorry, this report doesn't include enough information for me to understand what went wrong. If this happens again, can you add the text in the code box and say how to reproduce the problem?

Thanks,
Noam