Upgrade Plone 4.3.1 to Plone 4.3.15 on Windows

The error message (--> no such option) tells you that your bootstrap.py does not know the option --application-choice.

Has python bootstrap.py --help mentioned this option? In this case, this would be a bug in bootstrap.py. The "githup" page, I have linked to, reflects the so called "master" branch; this is a development branch and its content may be under development (and still have considerable bugs). On "githup", you will also be able to find the release branch corresponding to the version of zc.buildout typically used with Plone 4.3.15 (its version.cfg should tell you this version) -- but I do not know the exact way to access a specific branch on "githup". Likely, this will be possible from the project home (for zc.buildout).

I am not sure, that you need any options. You could try python bootstrap.py and see what happens. In the worst case, this would install versions of zc.buildout and setuptools not compatible with the expectations of Plone. In this case, a later bin/buildout would tell you. You could then start to investigate how to tell bootstrap.py which versions of these packages should be installed.

PyPa is also trying to host the most recent version of bootstrap.py.

https://bootstrap.pypa.io/bootstrap-buildout.py

Hello to all
Thank you for your answers and your help
By running siplement python bootstrap.py or python bootstrap-buildout.py
I get the same result as here ...
Microsoft Windows [version 10.0.17134.407]
(c) 2018 Microsoft Corporation. Tous droits réservés.
"C:\Users\Purnata>cd
C:>cd Plone43
C:\Plone43>python bootstrap-buildout.py
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Exception lors de l'appel de «DownloadFile» avec «2» argument(s): «La demande a été abandonnée: Impossible de créer un
canal sécurisé SSL/TLS.»
Au caractère Ligne:1 : 106

  • ... redentials; (new-object System.Net.WebClient).DownloadFile("https://p ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:slight_smile: [], MethodInvocationException
    • FullyQualifiedErrorId : WebException
      Traceback (most recent call last):
      File "bootstrap-buildout.py", line 117, in
      ez'use_setuptools'
      File "", line 188, in use_setuptools
      File "", line 139, in _do_download
      File "", line 355, in download_setuptools
      File "", line 256, in download_file_powershell
      File "", line 230, in _clean_check
      File "C:\Python27\lib\subprocess.py", line 190, in check_call
      raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['powershell', '-Command', '[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile("https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip", "c:\users\purnata\appdata\local\temp\bootstrap-tm83sh\setuptools-33.1.1.zip")']' returned non-zero exit status 1
      C:\Plone43>"
      In advance, thank you to those who can help me move forward

As the output states, it is trying to run a Powershell command to download setuptools.

Do you have Powershell available to your user?

Potentially, this was a temporary problem. I could download the url above without any problem. Another possibility could be that on the host/computer where you run the bootstrap, the root certificates necessary for SSL/TLS (and therefore "https") are missing. Those certificates are typically installed with a browser. Has your host a browser installed?

The second problem might be a followup problem: failing the direct download, potentially a download via an external process is tried. The alternative is likely not as tested and documented as the direct download -- as the direct download typically succeeds.

Hello everyone,
Indeed, several web browsers are installed on this computer (Firefox, Internet Explorer, Edge, Vivaldi, Chrome etc.).

So it seemed that the problem could come from the other point you raise: "subprocess.CalledProcessError: Command '[' powershell ',' -Command ',' [System.Net.WebRequest] :: DefaultWebProxy.Credentials"

How can I fix this "subprocess" problem

Thanks for your help.

We do not have sufficient information to answer this question.

You could try to run the command from the command line and record the error messages, you see there.

I do not have sufficient Windows knowledge to tell you how the command would look like on the command line.

The command has 3 parts

  1. powershell
  2. -Command
  3. [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile("https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip", "c:\users\purnatappdata\local emootstrap-tm83sh\setuptools-33.1.1.zip")

The last part is complex, contains blanks and (likely) special characters like ", [] and (). It will need quoting to get the argument correctly to powershell. If you have enough Windows knowledge, you can try to call it and iterprete the error messages this gives.

Of course, in order to call powershell, this must be installed. If this is not the case, start installing it.

I have another idea for you: apparently, bootstrap.py does not download setuptools/zc.buildout when it is already there. Thus, you could try to install setuptools and zc.buildout with standard Python tools (such as pip) and only then call python bootstrap.py.

In that case it might be smarter to just install both setuptools and zc.buildout via pip and not do bootstrapping at all. That is the way of the future as bootstrapping cannot support a setuptools beyond 33.1.1.

1 Like

Hello all.

I want to thank you all for your help.

Regarding the difficulties to upgrade from Plone 4.3.1 to plone 4.3.15 (and why not 4.3.18 later), I used "get-pip.py" to install pip-18.1, setuptools-40.5.0 and wheel-0.321 under python 3.7.0 then python2.7.15. On a computer.But it is python 2.7.15 which is active and used.

On the current computer where I'm trying to update Plone 4.31 it's setuptools-39.0.1 that was installed with "get-pip.py", but I did not try to perform an update of stuptools.

So, if by running "bootstrap.py" the program tries to download setuptools-33.1.1, is this the version that is needed to update Plone 4.3.1?

How to get out of this impasse?

To follow your suggestions and especially that of Joni, I can try to install zc.buildout via pip, but how to setuptools when setuptools-39.0.1 is already installed on this computer?

Thanks in advance.

You can find out what version of a package a given Plone version wants by looking in " http://dist.plone.org/release/<plone-version>/versions.cfg". For Plone 4.3.15, you look in http://dist.plone.org/release/4.3.15/versions.cfg and find that it wants setuptools 26.1.1. By the way, Plone 4.3.1 wants setuptools 06c11.

bootstrap.py is rarely used by us. Many of us have never used it explicitly. Typically, you need it only if you need to give an existing Plone installation new Python, setuptools and zc.buildout infrastructure. But, usually, it is much simpler just to install Plone anew (apparently. this is difficult only under Windows). As a consequence, there are very few bootstrap.py experts around. Especially, I am no such expert: everything, I know about bootstrap.py I found out by looking at its source. You, too, can have a look at this source.

setuptools has a peculiarity. In fact, setuptools can come from two competing distributions: setuptools or distribute. setuptools was the original implementation; some people found the ideas there good but were not satisfied with other things. They created distribute as a replacement which, once installed, almost looks like a setuptools installation.

The bootstrap.py versions I have looked into do something special with setuptools versus distribute. The version I have locally installed (for Plone 4.2.4) insists on using distribute. Your more modern bootstrap.py might allow to choose between setuptools and distribute via a command line option or may still insist on using distribute -- look at its source to find out. Your observation might mean that the setuptools installed does not come from the distribution expected by your bootstrap.py call.

Hello everyone,

Thank you for all your explanations and suggestions. It keeps me going despite the challenges I'm facing.

I hope that if I come with your help to solve these problems, it will be useful for other windows users interested in Plone.

I am deeply convinced that those who by necessity use Windows should not give up using Plone.

In fact, as I can not install directly (via an .exe) a plone version beyond Plone 4.3.1. , I downloaded Plone 4.3.15 and 4.3.18 to check versions (python, setuptools, zc.buildout etc.)

After your last message, I checked the 4.3.15 package with 7Zip.
In the "buildout_templates" folder, there is the "buildout.cfg" file where I could find in the [versions] section:
zc.buildout = 2.5.3
setuptools = 27.3.0
Pillow = 4.1.0 etc.

Therefore, why "bootstrap.py" will get me another version of
setuptools.

Besides, you are absolutely right.
I need "bootstrap.py" because under Windows Plone 4.3.1 uses Python 2.6. That's why I installed python 2.7.15 to use it when updating to Plone 4.3.15.

My question is: how to install setuptools 27.3.0 for python 2.7.15 while setuptools 39.0.1 is already installed. Do I have to uninstall it?

It is true that it is complicated to update Plone Windows but it's exciting is not it?

Thank you again for your help.

1 Like

You have "bootstrap.py" in source. Open it in an editor and look at it.

My old bootstrap.py (for Plone 4.2.4) contains:

# We decided to always use distribute, make sure this is the default for us
# USE_DISTRIBUTE = options.distribute
USE_DISTRIBUTE = True
args = args + ['bootstrap']

to_reload = False
try:
    import pkg_resources
    if not hasattr(pkg_resources, '_distribute'):
        to_reload = True
        raise ImportError
except ImportError:
    ez = {}
    if USE_DISTRIBUTE:
        exec urllib2.urlopen('http://python-distribute.org/distribute_setup.py'
                         ).read() in ez
        ez['use_setuptools'](to_dir=tmpeggs, download_delay=0, no_fake=True)
    else:
        exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
                             ).read() in ez
        ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
...

This means: my bootstrap.py will use whatever setuptools version is installed provided that it comes from a distribute "distribution" (and not a "setuptools" distribution). In addition, if there is either no setuptools at all or a setuptools from the wrong "distribution", then it will download the latest version of distribute_setup and install distribute (and by that the distribute version of setuptools) via it. This will install the latest setuptools version installable via this path -- independently from what Plone expects.

The bootstrap.py you have downloaded is much more modern. When I remember right, then it allows you to specify via command line options, whether it should use the distribute or setuptools "distribution" and allows you to specify exactly which setuptools and zc.buildout version it should install. Run python bootstrap.py --help to learn which options your bootstrap.py supports. Determine which options you need and the corresponding values. Run then python bootstrap.py with these options and values.

Hello everyone,

First of all, thank you for your help

I make a feedback always around the update of Plone 4.3.1 to 4.3.15 under Windows 10.

I started with --help and voice the result:

« Microsoft Windows [version 10.0.17134.407]
(c) 2018 Microsoft Corporation. Tous droits réservés.

C:\Users\Purnata>cd \

C:>cd Plone43

C:\Plone43>python bootstrap.py --help
Usage: [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
Bootstraps a buildout-based project.
Simply run this script in a directory containing a buildout.cfg, using the
Python that you want bin/buildout to use.
Note that by using --find-links to point to local resources, you can keep
this script from going over the network.

Options:
-h, --help show this help message and exit
--version Return bootstrap.py version.
-t, --accept-buildout-test-releases
Normally, if you do not specify a --buildout-version,
the bootstrap script and buildout gets the newest
final versions of zc.buildout and its recipes and
extensions for you. If you use this flag, bootstrap
and buildout will get the newest releases even if they
are alphas or betas.
-c CONFIG_FILE, --config-file=CONFIG_FILE
Specify the path to the buildout configuration file to
be used.
-f FIND_LINKS, --find-links=FIND_LINKS
Specify a URL to search for buildout releases
--allow-site-packages
Let bootstrap.py use existing site packages
--buildout-version=BUILDOUT_VERSION
Use a specific zc.buildout version
--setuptools-version=SETUPTOOLS_VERSION
Use a specific setuptools version
--setuptools-to-dir=SETUPTOOLS_TO_DIR
Allow for re-use of existing directory of setuptools
versions

C:\Plone43> »

Then taking inspiration from the result, I requested the versions of setuptools and buidout for Plone 4.3.15.

Here is the result:

« Microsoft Windows [version 10.0.17134.407]
(c) 2018 Microsoft Corporation. Tous droits réservés.

C:\Users\Purnata>cd \

C:>cd Plone43

C:\Plone43>python bootstrap.py --setuptools-version=27.3.0 --buildout-version=2.5.3
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-27.3.0.zip
Exception lors de l'appel de «DownloadFile» avec «2» argument(s): «La demande a été abandonnée: Impossible de créer un
canal sécurisé SSL/TLS.»
Au caractère Ligne:1 : 106

  • ... redentials; (new-object System.Net.WebClient).DownloadFile("https://p ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:slight_smile: [], MethodInvocationException
    • FullyQualifiedErrorId : WebException

Traceback (most recent call last):
File "bootstrap.py", line 113, in
ez'use_setuptools'
File "", line 188, in use_setuptools
File "", line 139, in _do_download
File "", line 355, in download_setuptools
File "", line 256, in download_file_powershell
File "", line 230, in _clean_check
File "C:\Python27\lib\subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['powershell', '-Command', '[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile("https://pypi.io/packages/source/s/setuptools/setuptools-27.3.0.zip", "c:\users\purnata\appdata\local\temp\bootstrap-_iqojm\setuptools-27.3.0.zip")']' returned non-zero exit status 1

C:\Plone43> »

Obviously I'm still faced with this problem of

«The request has been dropped: Can not create a
secure SSL / TLS channel.»

Does anyone have an idea to help me solve this problem?

Thank you in advance for your help.

I recognize now that the "download" problem message comes from the powershell call. It (i.e. a Windows utility) is unable to create a secured connection to pypi.io. As I am able to access https://pypi.io/packages/source/s/setuptools/setuptools-27.3.0.zip without problem, I assume that this is a local Windows problem at your side. One option is then that you ask a local Windows expert to help you solve it.

Another option is that you learn how to convince bootstrap.py to use an existing setuptools installation, you have previously installed (e.g. via pip). For this, you open your bootstrap.py in a text editor and look at the code. You locate the place where the powershell command is constructed and check under what conditions, this is avoided (e.g. because something was already there). You then ensure that the condition is met in the next bootstrap run. Should you have problems to understand the code in bootstrap,py, ask help from a local Python expert.

Hello everyone
Thanks to your sugesstions, I focused on Windows and especially powershell related to https.
Thank you.
This was a problem with the Microsoft .NET Framework version.
The problem is resolved and the version of setuptools-27.3.0 has been successfully installed in EGGS.
Now that I go back to the actual Plone 4.3.1 update to 4.3.15, I have a new error message:
"Microsoft Windows [version 10.0.17763.134]
(c) 2018 Microsoft Corporation. All rights reserved.
C: \ Users \ Purnata> cd
C: > cd Plone43
C: \ Plone43> bin \ buildout.exe
Getting distribution for 'zc.buildout == 1.7.1'.
while:
Installing.
Checking for upgrades.
Getting distribution for 'zc.buildout == 1.7.1'.
Error: Could not find a distribution for 'zc.buildout == 1.7.1'.
C: \ Plone43> "
Any ideas?
Thanks in advance.

PyPI itself has moved in the meanwhile and now demands https per default. Some of the associated links now point to sources not previously whitelisted. You need to amend your buildout to match the reality of today.

As a rough guideline, look here as a starting point:

Hello everyone
Thanks to your help, I was able to move forward again on the topic related to "https".

  1. in the buildout.cfg file, I added the line « index = https://pypi.org/simple/ » to the [buildout] section.
    That's what I found on the page recommended by Joni here:
    https://github.com/plone/buildout.coredev/pull/457/commits/53670c9c0bdc86ea754167a832077c59b27fb319
    Then in the three files base.cfg, version.cfg and buildout.cfg, I replaced everywhere "http" by https.
    Here is the result:

« Microsoft Windows [version 10.0.17763.134]
(c) 2018 Microsoft Corporation. All rights reserved.

C: \ Users \ Purnata> cd \

C: > cd Plone43

C: \ Plone43> bin \ buildout.exe
Getting distribution for 'zc.buildout == 1.7.1'.
Got zc.buildout 1.7.1.
Getting distribution for 'setuptools == 26.1.1'.
warning: no files found matching '*' under directory 'setuptools \ _vendor'
Got setuptools 26.1.1.
Upgraded:
zc.buildout version 1.7.1,
setuptools version 26.1.1;
restarting.
Generated script 'C: \ Plone43 \ bin \ buildout'.
while:
Installing.
Getting instance section.
Initializing section instance.
Loading input sections for 'instance'
Error: No section named 'base_instance'

C: \ Plone43> »

I missed something?
Someone has an idea?

Thanks in advance.

That looks like a transient error on the restart-after-self-update logic. Simply running it again (now that it has self updated to its liking), might do the trick.

Hello everyone,

I restart the bin / buildout and here is the result:

"Microsoft Windows [version 10.0.17763.134]
(c) 2018 Microsoft Corporation. All rights reserved.

C: \ Users \ Purnata> cd \

C: > cd Plone43

C: \ Plone43> bin \ buildout.exe
while:
Installing.
Loading extensions.
Error: There is a version conflict.
We already have: setuptools 26.1.1

C: \ Plone43> "

Indeed, looking in the folder "eggs", there is a folder "setuptools-26.1.1-py.2.7.egg.
But also I have a setuptools file 27.3.0-py.2.7.egg that I had installed with bootstrap.py.
Finally the file setuptools-0.6c11-py2.6.egg
original with Plone 4.3.1.
My question: how to uninstall setuptools 26.1.1 which I do not know how it is installed in the "eggs" folder?
In advance I thank you for your help.