Re: [Zope] Upgrading to Zope 2.9.1
On 3/9/06, Einar Næss Jensen <einar.nass.jensen@gmail.com> wrote:
On 3/9/06, Brian Sullivan <briansullivan@gmail.com> wrote:
On 3/9/06, Dieter Maurer <dieter@handshake.de> wrote:
Chris Withers wrote at 2006-3-9 08:10 +0000:
... Really? I find that pretty suprising. Python has never cared about line endings before and I'd be pretty mortified if it started now :-(
Dieter?
It does now -- at least for "FSPythonScripts" when you are on a *nix platform and your files contain DOS lineends.
You then will get (starting with Python 2.4) SyntaxErrors at line ends.
Of course, things are different when you are on a Windows platform and your files contain DOS lineends...
Different in what way?
I was experiencing difficulty on a Windows platform. The scripts in question have never seen anything other than Windows.
Are you indicating that the line end issue is not what I was experiencing? _______________________________________________
My guess is that it would be difficult to say anything about that without any errormessages? What did it say in your line 3, and what made you look there?
Something like: invalid syntax (Script (Python), line 3) (in a pink box when the script was opened for editing via the ZMI) Since I saved the script and the problem went away I can't be totally sure.
Attached is is screenshot of the error message. There is no error in the event log. Steps to reproduce : - Create a Python Script on the file system with Windows style line-endings - Go to http://localhost:8080/manage - Click the drop down list to add a Python Script - Enter "test_eol" in the id field - Click "Browse" to find and select your script on the filesystem - Click "Add" - Error : invalid syntax (Script (Python), line 2) - Click "Save changes" -> the error is gone. System information : - Windows 2000 SP4 (client and server) - Zope 2.9.1 (fresh install with http://www.zope.org/Products/Zope/2.9.1/Zope-2.9.1-win32.exe installer) - Only product installed : ExternalEditor 0.9.1 # Zope version: (Zope 2.9.1, python 2.4.2, win32) # Python version: 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] # System Platform: win32 # SOFTWARE_HOME: C:\Program Files\Zope-2.9.1\lib\python # INSTANCE_HOME: D:\Zope-Instance # CLIENT_HOME: D:\Zope-Instance\var # Process ID: 1080 (1460) # Running for: 14 min 14 sec # sys.path: D:\Zope-Instance\lib\python D:\Zope-Instance\lib\python C:\Program Files\Zope-2.9.1\lib\python\Zope2\Startup C:\Program Files\Zope-2.9.1\lib\python C:\Program Files\Zope-2.9.1\lib\python C:\Program Files\Zope-2.9.1\bin\python24.zip C:\Program Files\Zope-2.9.1\bin\DLLs C:\Program Files\Zope-2.9.1\bin\lib C:\Program Files\Zope-2.9.1\bin\lib\plat-win C:\Program Files\Zope-2.9.1\bin\lib\lib-tk C:\Program Files\Zope-2.9.1\bin C:\Program Files\Zope-2.9.1\bin\lib\site-packages C:\Program Files\Zope-2.9.1\bin\lib\site-packages\win32 C:\Program Files\Zope-2.9.1\bin\lib\site-packages\win32\lib C:\Program Files\Zope-2.9.1\bin\lib\site-packages\Pythonwin On 3/10/06, Brian Sullivan <briansullivan@gmail.com> wrote:
Something like:
invalid syntax (Script (Python), line 3)
(in a pink box when the script was opened for editing via the ZMI)
Since I saved the script and the problem went away I can't be totally sure. _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On 3/10/06, Patrick Decat <pdecat@gmail.com> wrote:
Attached is is screenshot of the error message.
There is no error in the event log.
Steps to reproduce : - Create a Python Script on the file system with Windows style line-endings - Go to http://localhost:8080/manage - Click the drop down list to add a Python Script - Enter "test_eol" in the id field - Click "Browse" to find and select your script on the filesystem - Click "Add" - Error : invalid syntax (Script (Python), line 2) - Click "Save changes" -> the error is gone.
System information : - Windows 2000 SP4 (client and server) - Zope 2.9.1 (fresh install with http://www.zope.org/Products/Zope/2.9.1/Zope-2.9.1-win32.exe installer) - Only product installed : ExternalEditor 0.9.1
Sounds like exactly what I experienced ( I guess the repro steps should mean it will be fixed).
Brian Sullivan wrote:
Something like:
invalid syntax (Script (Python), line 3)
(in a pink box when the script was opened for editing via the ZMI)
Since I saved the script and the problem went away I can't be totally sure.
I sometimes see this when there a syntax error elsewhere in the file (missing bracket, bad indentation, etc) For some reason, PythonScripts seem to give bad line number reports and sometimes odd error messages when this sort of thing happens... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
Brian Sullivan -
Chris Withers -
Patrick Decat