Patiencer / pyscripter

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

exceptions.TypeError: 'str' object is not callable. #350

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Great app.

After typing:
for x in range(

I'll get:
exceptions.TypeError: 'str' object is not callable.

Details:
Exception class: EPyTypeError
Exception message: exceptions.TypeError: 'str' object is not callable.
Exception address: 005C354B
---------------------------------------------------------------------------

---
PyScripter version : 1.9.9.7
Python DLL : python25.dll
Python Engine : peInternal
---------------------------------------------------------------------------

---
Stack list, generated 12/22/2009 10:33:41 AM
(001C2546){PyScripter.exe} [005C3546] 
PythonEngine.TPythonEngine.RaiseError (Line 6021, "PythonEngine.pas" + 61) 
+ $19
(001C4B52){PyScripter.exe} [005C5B52] 
PythonEngine.TPythonEngine.CheckError (Line 6997, "PythonEngine.pas" + 14) 
+ $2
(00377748){PyScripter.exe} [00778748] 
VarPyth.TPythonVariantType.EvalPython (Line 1487, "VarPyth.pas" + 84) + $5
(00005C8C){PyScripter.exe} [00406C8C] System.DynArraySetLength + $144
(00376B72){PyScripter.exe} [00777B72] 
VarPyth.TPythonVariantType.DoFunction (Line 1194, "VarPyth.pas" + 2) + $B
(003769FA){PyScripter.exe} [007779FA] 
VarPyth.TPythonVariantType.DoDispInvoke (Line 1144, "VarPyth.pas" + 62) + 
$13
(003764A7){PyScripter.exe} [007774A7] 
VarPyth.TPythonVariantType.DispInvoke (Line 942, "VarPyth.pas" + 1) + $C
(000141B1){PyScripter.exe} [004151B1] Variants.@DispInvoke + $C1
(003DD5A9){PyScripter.exe} [007DE5A9] 
cRefactoring.TFunctionProxy.ArgumentsString (Line 1127, "cRefactoring.pas" 
+ 1) + $18
(003ABC94){PyScripter.exe} [007ACC94] 
frmEditor.TEditorForm.SynParamCompletionExecute (Line 
2474, "frmEditor.pas" + 92) + $8
(0030E86F){PyScripter.exe} [0070F86F] 
SynCompletionProposal.TSynBaseCompletionProposal.ExecuteEx (Line 
2453, "SynCompletionProposal.pas" + 5) + $1D
(0030FA83){PyScripter.exe} [00710A83] 
SynCompletionProposal.TSynCompletionProposal.ExecuteEx (Line 
3297, "SynCompletionProposal.pas" + 5) + $10
(0030FC70){PyScripter.exe} [00710C70] 
SynCompletionProposal.TSynCompletionProposal.DoExecute (Line 
3380, "SynCompletionProposal.pas" + 18) + $22
(0030F98D){PyScripter.exe} [0071098D] 
SynCompletionProposal.TSynCompletionProposal.TimerExecute (Line 
3246, "SynCompletionProposal.pas" + 5) + $D
(00054D8B){PyScripter.exe} [00455D8B] ExtCtrls.TTimer.Timer + $F
(00054C6F){PyScripter.exe} [00455C6F] ExtCtrls.TTimer.WndProc + $2B
(0002DC7C){PyScripter.exe} [0042EC7C] Classes.StdWndProc + $14
(00081E88){PyScripter.exe} [00482E88] Forms.TApplication.ProcessMessage + 
$FC
(00081EC2){PyScripter.exe} [00482EC2] Forms.TApplication.HandleMessage + $A
(000820E2){PyScripter.exe} [004830E2] Forms.TApplication.Run + $96
(00429200){PyScripter.exe} [0082A200] PyScripter.PyScripter (Line 129, "" 
+ 6) + $7
---------------------------------------------------------------------------

---
System   : Windows Vista Home Edition, Version: 6.0, Build: 1772, "Service 
Pack 2"
Processor: Intel, Genuine Intel(R) CPU             585  @ 2.16GHz, 2160 
MHz MMX SSE SSE2 SSE3 SSSE3 64 bits DEP
Memory: 1915; free 843
Display  : 1280x800 pixels, 32 bpp
---------------------------------------------------------------------------

---
List of loaded modules:
[00400000] C:\Program Files\PyScripter\PyScripter.exe
           1.9.9.7 - 1.9.9.7
[1E000000] C:\Windows\system32\python25.dll
           2.5.4150.1013 - 2.5.4
           Python Core
[65AA0000] C:\Windows\system32\wpdshext.dll
           6.0.6002.18112 - 6.0.6002.18112 (vistasp2_gdr_win7ip_wpd
(wmbla).090930-1800)
           Portable Devices Shell Extension
[65D30000] C:\Windows\system32\WMVCore.DLL
           11.0.6002.18049 - 11.0.6002.18049 (vistasp2_gdr.090609-2338)
           Windows Media Playback/Authoring DLL
[68570000] C:\Windows\system32\HHCtrl.ocx
           6.0.6001.18000 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Microsoft® HTML Help Control
[68700000] C:\Windows\system32\WMASF.DLL
           11.0.6001.7000 - 11.0.6001.7000 (longhorn_rtm.080118-1840)
           Windows Media ASF DLL
[687A0000] C:\Windows\system32\audiodev.dll
           6.0.6001.18000 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Portable Media Devices Shell Extension
[68AE0000] C:\Windows\System32\davclnt.dll
           6.0.6002.18005 - 6.0.6002.18005 (lh_sp2rtm.090410-1830)
           Web DAV Client DLL
[68B00000] C:\Windows\System32\EhStorAPI.dll
           6.0.6002.18005 - 6.0.6002.18005 (lh_sp2rtm.090410-1830)
           Windows Enhanced Storage API
[68B20000] C:\Windows\System32\ntlanman.dll
           6.0.6001.18000 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Microsoft® Lan Manager
[692D0000] C:\Windows\system32\olepro32.dll
           6.0.6002.18005 - 6.0.6002.18005
[6BA80000] C:\Windows\System32\netshell.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Network Connections Shell
[6BE00000] C:\Windows\system32\RICHED20.DLL
           5.31.23.1229 - 5.31.23.1229
           Rich Text Edit Control, v3.1
[6C7B0000] C:\Windows\system32\RICHED32.DLL
           6.0.6001.18000 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Wrapper Dll for Richedit 1.0
[6CF30000] C:\Windows\system32\msimg32.dll
           6.0.6000.16386 - 6.0.6000.16386 (vista_rtm.061101-2205)
           GDIEXT Client DLL
[6D620000] C:\Windows\system32\PortableDeviceApi.dll
           6.0.6002.18112 - 6.0.6002.18112 (vistasp2_gdr_win7ip_wpd
(wmbla).090930-1800)
           Windows Portable Device API Components
[6E830000] C:\Windows\system32\cscapi.dll
           6.0.6002.18005 - 6.0.6002.18005 (lh_sp2rtm.090410-1830)
           Offline Files Win32 API
[6E850000] C:\Windows\system32\winspool.drv
           6.0.6002.18087 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Windows Spooler Driver
[6EA80000] C:\Windows\system32\ieframe.dll
           8.0.6001.18865 - 8.00.6001.18702 (longhorn_ie8_rtm
(wmbla).090308-0339)
           Internet Explorer
[70860000] C:\Windows\system32\IconCodecService.dll
           6.0.6000.16386 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Converts a PNG part of the icon to a legacy bmp icon
[708F0000] C:\Windows\system32\EhStorShell.dll
           5.2.3790.1830 - 5.2.3790.1830
           Windows Enhanced Storage Shell Extension
[70BD0000] C:\Windows\System32\shdocvw.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Shell Doc Object and Control Library
[72460000] C:\Windows\system32\WindowsCodecs.dll
           7.0.6002.18107 - 7.0.6002.18107 (vistasp2_gdr_win7ip_dgt
(wmbla).090924-1550)
           Microsoft Windows Codecs Library
[726C0000] C:\Windows\System32\drprov.dll
           6.0.6000.16386 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Microsoft Terminal Server Network Provider
[73E00000] C:\Windows\system32\PROPSYS.dll
           7.0.6002.18005 - 7.00.6002.18005 (lh_sp2rtm.090410-1830)
           Microsoft Property System
[73F00000] 
C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6002.1
8005_none_9e50b396ca17ae07\gdiplus.dll
           5.2.6002.18005 - 5.2.6002.18005 (lh_sp2rtm.090410-1830)
           Microsoft GDI+
[740B0000] C:\Windows\System32\nlaapi.dll
           6.0.6001.18000 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Network Location Awareness 2
[740F0000] C:\Windows\system32\oleacc.dll
           7.0.6002.18155 - 7.0.6002.18155 (vistasp2_gdr_win7ip_uia
(wmbla).091008-1406)
           Active Accessibility Core Component
[74130000] C:\Windows\system32\winmm.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           MCI API DLL
[74F90000] C:\Windows\system32\uxtheme.dll
           6.0.6001.18000 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Microsoft UxTheme Library
[750B0000] C:\Windows\WinSxS\x86_microsoft.windows.common-
controls_6595b64144ccf1df_6.0.6002.18005_none_5cb72f96088b0de0\comctl32.dll
           6.10.6002.18005 - 6.10 (longhorn_rtm.080118-1840)
           User Experience Controls Library
[75440000] C:\Windows\system32\WINTRUST.dll
           6.0.6001.18000 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Microsoft Trust Verification APIs
[754D0000] C:\Windows\system32\version.dll
           6.0.6002.18005 - 6.0.6002.18005 (lh_sp2rtm.090410-1830)
           Version Checking and File Installation Libraries
[759E0000] C:\Windows\System32\dhcpcsvc6.DLL
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           DHCPv6 Client
[75A10000] C:\Windows\System32\WINNSI.DLL
           6.0.6001.18000 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Network Store Information RPC interface
[75A20000] C:\Windows\System32\dhcpcsvc.DLL
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           DHCP Client Service
[75A60000] C:\Windows\System32\IPHLPAPI.DLL
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           IP Helper API
[75B00000] C:\Windows\System32\CRYPT32.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Crypto API32
[75C00000] C:\Windows\system32\mpr.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Multiple Provider Router DLL
[75C60000] C:\Windows\System32\MSASN1.dll
           6.0.6002.18106 - 6.0.6002.18106 (vistasp2_gdr.090903-2340)
           ASN.1 Runtime APIs
[75CA0000] C:\Windows\System32\DNSAPI.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           DNS Client API DLL
[75EB0000] C:\Windows\System32\NETAPI32.dll
           6.0.6002.18005 - 6.0.6002.18005 (lh_sp2rtm.090410-1830)
           Net Win32 API DLL
[75FF0000] C:\Windows\system32\apphelp.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Application Compatibility Client Library
[76080000] C:\Windows\system32\Secur32.dll
           6.0.6002.18051 - 6.0.6002.18051 (vistasp2_gdr.090615-0258)
           Security Support Provider Interface
[760A0000] C:\Windows\system32\Userenv.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Userenv
[76150000] C:\Windows\system32\PSAPI.DLL
           6.0.6000.16386 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Process Status Helper
[761F0000] C:\Windows\system32\oleaut32.dll
           6.0.6002.18005 - 6.0.6002.18005
[76280000] C:\Windows\system32\imm32.dll
           6.0.6002.18005 - 6.0.6002.18005 (lh_sp2rtm.090410-1830)
           Multi-User Windows IMM32 API Client DLL
[762F0000] C:\Windows\system32\NSI.dll
           6.0.6001.18000 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           NSI User-mode interface DLL
[76300000] C:\Windows\system32\LPK.DLL
           6.0.6002.18051 - 6.0.6002.18051 (vistasp2_gdr.090615-0258)
           Language Pack
[76310000] C:\Windows\system32\USP10.dll
           1.626.6002.18005 - 1.0626.6002.18005 (lh_sp2rtm.090410-1830)
           Uniscribe Unicode script processor
[76390000] C:\Windows\system32\wininet.dll
           8.0.6001.18865 - 8.00.6001.18702 (longhorn_ie8_rtm
(wmbla).090308-0339)
           Internet Extensions for Win32
[76480000] C:\Windows\system32\urlmon.dll
           8.0.6001.18865 - 8.00.6001.18702 (longhorn_ie8_rtm
(wmbla).090308-0339)
           OLE32 Extensions for Win32
[765C0000] C:\Windows\system32\kernel32.dll
           6.0.6002.18005 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Windows NT BASE API Client DLL
[766A0000] C:\Windows\system32\imagehlp.dll
           6.0.6001.18000 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Windows NT Image Helper
[766D0000] C:\Windows\system32\CLBCatQ.DLL
           2001.12.6931.18000 - 2001.12.6931.18000 (longhorn_rtm.080118-
1840)
           COM+ Configuration Catalog
[76760000] C:\Windows\system32\WS2_32.dll
           6.0.6001.18000 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Windows Socket 2.0 32-Bit DLL
[76790000] C:\Windows\system32\ADVAPI32.dll
           6.0.6002.18005 - 6.0.6002.18005 (lh_sp2rtm.090410-1830)
           Advanced Windows 32 Base API
[76860000] C:\Windows\system32\msvcrt.dll
           7.0.6002.18005 - 7.0.6002.18005 (lh_sp2rtm.090410-1830)
           Windows NT CRT DLL
[76910000] C:\Windows\system32\SHLWAPI.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Shell Light-weight Utility Library
[76970000] C:\Windows\system32\MSCTF.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           MSCTF Server DLL
[76A40000] C:\Windows\system32\SETUPAPI.dll
           6.0.6002.18005 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Windows Setup API
[76BD0000] C:\Windows\system32\USER32.dll
           6.0.6002.18005 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Multi-User Windows USER API Client DLL
[76C70000] C:\Windows\system32\comdlg32.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Common Dialogs DLL
[76CF0000] C:\Windows\system32\shell32.dll
           6.0.6002.18005 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Windows Shell Common Dll
[77800000] C:\Windows\system32\ole32.dll
           6.0.6002.18005 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Microsoft OLE for Windows
[77950000] C:\Windows\system32\iertutil.dll
           8.0.6001.18865 - 8.00.6001.18702 (longhorn_ie8_rtm
(wmbla).090308-0339)
           Run time utility for Internet Explorer
[77B40000] C:\Windows\system32\ntdll.dll
           6.0.6002.18005 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           NT Layer DLL
[77C70000] C:\Windows\system32\GDI32.dll
           6.0.6002.18005 - 6.0.6002.18005 (lh_sp2rtm.090410-1830)
           GDI Client DLL
[77CC0000] C:\Windows\system32\Normaliz.dll
           6.0.6000.16386 - 6.0.6000.16386 (vista_rtm.061101-2205)
           Unicode Normalization DLL
[77CD0000] C:\Windows\system32\RPCRT4.dll
           6.0.6002.18024 - 6.0.6001.18000 (longhorn_rtm.080118-1840)
           Remote Procedure Call Runtime
[7C340000] C:\Windows\system32\MSVCR71.dll
           7.10.3052.4 - 7.10.3052.4
           Microsoft® C Runtime Library
---------------------------------------------------------------------------

---
Active Controls hierarchy:
TSynEdit "SynEdit"
TSpTBXTabSheet "tbshSource"
TSpTBXTabControl "ViewsTabControl"
TPanel "FGPanel"
TEditorForm "EditorForm"
TSpTBXTabSheet "SpTBXTabSheet1"
TSpTBXTabControl "TabControl"
TPanel "BGPanel"
TPyIDEMainForm "PyIDEMainForm"
---------------------------------------------------------------------------

---

Original issue reported on code.google.com by thom1...@gmail.com on 22 Dec 2009 at 3:40

GoogleCodeExporter commented 9 years ago
I think what happened is:
-  You were using the internal interpreter
-  You run a script overwriting the built-in str.
-  PyScripter is using the built-in functions in various places, and clearly 
your str
was not what PyScripter expected.

Lessons
-  Do not overwrite builtins
-  Use if possible the remote interpreter, which if nothing else can be
reinitialized. (http://pyscripter.googlepages.com/remotepythonengines)

Original comment by pyscripter on 2 Jan 2010 at 4:09