doing it by hand
>>> oneline_re ='sympify\([^\)].+?(?<=[\w\]\}\'"])\)(?!,)'
>>> multiline_re ='sympify\([^\)]+(?<=[\w\]\}\'"])\)(?!,)'
>>> Text = None
>>> sigs_1 = re.findall(oneline_re + '|' + multiline_re, Text)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"D:\result_tests\WinPython-64bit-3.4.2.3_build3\python-3.4.2.amd64\lib\re.py",
line 206, in findall
return _compile(pattern, flags).findall(string)
TypeError: expected string or buffer
On Tuesday, December 2, 2014 8:05:08 PM UTC+1, [email protected] wrote:
>
> I had print() before the failing code
>
> # Grabbing signatures
> print('oneline_re ',oneline_re )
> print('multiline_re ',multiline_re )
> print('text ',text )
>
> sigs_1 = re.findall(oneline_re + '|' + multiline_re, text)
>
> I get :
>
> oneline_re sympify\([^\)].+?(?<=[\w\]\}\'"])\)(?!,)
> multiline_re sympify\([^\)]+(?<=[\w\]\}\'"])\)(?!,)
> text None
> Traceback (most recent call last):
> File
> "D:\result_tests\WinPython-64bit-3.4.2.3_build3\python-3.4.2.amd64\lib\site-packages\spyderlib\widgets\editor.py",
>
> line 433, in show_object_info
> signature = getsignaturefromtext(doc_text, obj_name)
> File
> "D:\result_tests\WinPython-64bit-3.4.2.3_build3\python-3.4.2.amd64\lib\site-packages\spyderlib\utils\dochelpers.py",
>
> line 182, in getsignaturefromtext
> sigs_1 = re.findall(oneline_re + '|' + multiline_re, text)
> File
> "D:\result_tests\WinPython-64bit-3.4.2.3_build3\python-3.4.2.amd64\lib\re.py",
>
> line 206, in findall
> return _compile(pattern, flags).findall(string)
> TypeError: expected string or buffer
>
> On Tuesday, December 2, 2014 3:50:46 AM UTC+1, Yuxiang Wang wrote:
>>
>> Hi,
>>
>> I am reporting this here because I do not know for sure 1) whether this
>> is a bug; 2) whether this is an error from spyder side or sympy side.
>>
>> Brief description: the internal console reports TypeError and gets focus
>> whenever I type S( in the editor, after from sympy import S
>>
>> How to reproduce:
>>
>> (New file)
>>
>> from sympy import S
>>
>> S(
>>
>>
>> And right here, the editor will lose focus and the internal console get
>> focus. It says:
>>
>> Spyder Internal Console
>>
>> This console is used to report application
>> internal errors and to inspect Spyder
>> internals with the following commands:
>> spy.app, spy.window, dir(spy)
>>
>> Please don't use it to run your code
>>
>> >>> Traceback (most recent call last):
>> File
>> "X:\WinPython3\python-3.4.2.amd64\lib\site-packages\spyderlib\widgets\editor.py",
>>
>> line 433, in show_object_info
>> signature = getsignaturefromtext(doc_text, obj_name)
>> File
>> "X:\WinPython3\python-3.4.2.amd64\lib\site-packages\spyderlib\utils\dochelpers.py",
>>
>> line 178, in getsignaturefromtext
>> sigs_1 = re.findall(oneline_re + '|' + multiline_re, text)
>> File "X:\WinPython3\python-3.4.2.amd64\lib\re.py", line 206, in findall
>> return _compile(pattern, flags).findall(string)
>> TypeError: expected string or buffer
>>
>>
>>
>>
>> Python version: 3.4 64-bit
>> OS: Windows 7 64-bit
>> Spyder: 2.3.1
>>
>>
>>
>>
>> Shawn
>>
>>
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.