Zope, Python 2.4 pythonScripts import problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • krzychu@bmpg.pl

    #1

    Zope, Python 2.4 pythonScripts import problem

    Hi,

    I have installed brand new platform - Zope-2-7-6, Python 2.4.1, Plone
    2.0.5, OS Debian 1:3.3.6-2.

    After import a old Plone site from the following platform
    Zope-2-7-4, Python 2.3.3, Plone 2.0.3 to the new one, I get error when
    I visit PuthonScript in the ZMI.

    "invalid syntax (Script (Python), line 1)"

    There 2 are examples of 1 line:
    from DateTime import DateTime
    and
    request = container.REQUE ST

    There is no syntax error!

    When I just save this script in ZMI then error disappers :)

    What is the reason???
    KK

    p.s I have the same problem when I import to the same platform but with
    Python 2.4.0

  • Josef Meile

    #2
    Re: Zope, Python 2.4 pythonScripts import problem

    Hi,
    [color=blue]
    > I have installed brand new platform - Zope-2-7-6, Python 2.4.1, Plone
    > 2.0.5, OS Debian 1:3.3.6-2.[/color]

    You may then ask in a zope or plone list. This is a python specific
    list. But I will answer you any way.
    [color=blue]
    > After import a old Plone site from the following platform
    > Zope-2-7-4, Python 2.3.3, Plone 2.0.3 to the new one, I get error when
    > I visit PuthonScript in the ZMI.
    > "invalid syntax (Script (Python), line 1)"
    >
    > There 2 are examples of 1 line:
    > from DateTime import DateTime
    > and
    > request = container.REQUE ST
    >
    > There is no syntax error!
    >
    > When I just save this script in ZMI then error disappers :)[/color]

    So, you are exporting the plone site, then importing it? I had once some
    problem like that and the solution was to call an script that compiled
    all python scripts again. I'm not sure if this solves your problem, but
    you may look at the first script here:


    [color=blue]
    > What is the reason???[/color]

    As I said, you may ask in a zope or plone list for a better answer. My
    best guess is that somewhere there is some old compiled version of your
    script.
    [color=blue]
    > p.s I have the same problem when I import to the same platform but with
    > Python 2.4.0[/color]

    I just have to warn you that some persons in the zope list are going to
    tell you "Python 2.4 isn't a supported option for zope". So, you may use
    it only for testing and not in a production environment.

    Regards,
    Josef

    Comment

    • krzychu@bmpg.pl

      #3
      Re: Zope, Python 2.4 pythonScripts import problem

      I see that Python 2.4.x does not work with Zope-2-7-6 properly. When I
      start zope I get warning that I should recompile my pythonScripts by
      executing manage_addProdu ct/PythonScripts/recompile. I do it and get
      list of scripts whoose were compiled but when I repeat that action I
      get the same list of scripts. It doesn't compile them -> when I visit
      script by ZMI I still get the following error message "invalid syntax
      (Script (Python), line 1)".

      The first script at page
      http://www.zope.org/Members/goppelt/2-4-3Upgrade gives no effect ->
      outcome is "invalid syntax (Script (Python), line 1)" error i scripts.

      I'm affraid that I will have to resign with Python 2.4.x :(
      I read that Python 2.4 was complaisant back but I don't think that
      Zope-2-7-6 is???


      Regards
      KK


      Josef Meile napisal(a):[color=blue]
      > Hi,
      >[color=green]
      > > I have installed brand new platform - Zope-2-7-6, Python 2.4.1, Plone
      > > 2.0.5, OS Debian 1:3.3.6-2.[/color]
      >
      > You may then ask in a zope or plone list. This is a python specific
      > list. But I will answer you any way.
      >[color=green]
      > > After import a old Plone site from the following platform
      > > Zope-2-7-4, Python 2.3.3, Plone 2.0.3 to the new one, I get error when
      > > I visit PuthonScript in the ZMI.
      > > "invalid syntax (Script (Python), line 1)"
      > >
      > > There 2 are examples of 1 line:
      > > from DateTime import DateTime
      > > and
      > > request = container.REQUE ST
      > >
      > > There is no syntax error!
      > >
      > > When I just save this script in ZMI then error disappers :)[/color]
      >
      > So, you are exporting the plone site, then importing it? I had once some
      > problem like that and the solution was to call an script that compiled
      > all python scripts again. I'm not sure if this solves your problem, but
      > you may look at the first script here:
      >
      > http://www.zope.org/Members/goppelt/2-4-3Upgrade
      >[color=green]
      > > What is the reason???[/color]
      >
      > As I said, you may ask in a zope or plone list for a better answer. My
      > best guess is that somewhere there is some old compiled version of your
      > script.
      >[color=green]
      > > p.s I have the same problem when I import to the same platform but with
      > > Python 2.4.0[/color]
      >
      > I just have to warn you that some persons in the zope list are going to
      > tell you "Python 2.4 isn't a supported option for zope". So, you may use
      > it only for testing and not in a production environment.
      >
      > Regards,
      > Josef[/color]

      Comment

      • William Heymann

        #4
        Re: Zope, Python 2.4 pythonScripts import problem

        On Tuesday 16 August 2005 07:09 am, krzychu@bmpg.pl wrote:[color=blue]
        > I see that Python 2.4.x does not work with Zope-2-7-6 properly. When I
        > start zope I get warning that I should recompile my pythonScripts by
        > executing manage_addProdu ct/PythonScripts/recompile. I do it and get
        > list of scripts whoose were compiled but when I repeat that action I
        > get the same list of scripts. It doesn't compile them -> when I visit
        > script by ZMI I still get the following error message "invalid syntax
        > (Script (Python), line 1)".
        >
        > The first script at page
        > http://www.zope.org/Members/goppelt/2-4-3Upgrade gives no effect ->
        > outcome is "invalid syntax (Script (Python), line 1)" error i scripts.
        >
        > I'm affraid that I will have to resign with Python 2.4.x :(
        > I read that Python 2.4 was complaisant back but I don't think that
        > Zope-2-7-6 is???
        >[/color]

        Please read the docs that come with zope. No version of zope supports python
        2.4 right now. For zope 2.7 and zope 2.8 the python version to use is python
        2.3.5.

        Everytime a new version of python is done a lot of stuff is checked to make
        sure it works and minor changes are made. I know it is possible to get
        zope2.7 and 2.8 working fine on python 2.4 but that should only be done by
        zope developers and not by zope users.

        Comment

        Working...