spyder3 does not work after installation of Leap 15.2

I installed Leap 15.2, followed by an installation of spyder3 via
zypper install spyder3

But when starting a test program I get the following messages:

spyder3 test2.py
No protocol specified

(python3:4260): GStreamer-WARNING **: 19:40:43.873: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though.

I tried to install spyder 4.14 from
software.opensuse.org/package/spyder
This added two repositories
https://download.opensuse.org/repositories/devel:/languages:/python:/numeric/openSUSE_Leap_15.2/

https://download.opensuse.org/repositories/devel:/languages:/python:/backports/openSUSE_Leap_15.2/

The attempt of starting spyder3 now yields

spyder3 test2.py
Traceback (most recent call last):
File “/usr/bin/spyder3”, line 3, in <module>
start.main()
File “/usr/lib/python3.6/site-packages/spyder/app/start.py”, line 89, in main
options, args = get_options()
File “/usr/lib/python3.6/site-packages/spyder/app/cli_options.py”, line 140, in get_options
options = parser.parse_args(argv)
File “/home/michel/gnu7_openmpi2/lib/site-packages/argparse.py”, line 1688, in parse_args
args, argv = self.parse_known_args(args, namespace)
File “/home/michel/gnu7_openmpi2/lib/site-packages/argparse.py”, line 1709, in parse_known_args
if isinstance(action.default, basestring):
NameError: name ‘basestring’ is not defined

Hi
The code needs fixing for python3, basestring is no longer available in Python 3, it needs to change to str, you could try the 2to3 tool (cnf 2to3)?

See basestring here: https://docs.python.org/3.0/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit

Thank you for your notice, but I don’t see how it could help me. The difference to Leap 15.1 is that the error message concerning basestring appears during startup of spyder3 before the python script is started. In Leap 15.1 one could still circumvent the basestring error message on start-up by adding in the code.

try:
basestring
except NameError:
basestring = str

But this is no longer possible in Leap 15.2.

I am astonished that this error in python 3 is not corrected after being reported since six years.

Hi
The error is in your code being used (gnu7_openmpi2) not the system;


/home/michel/gnu7_openmpi2/lib/site-packages/argparse.py

This is very interesting. Thank you very much. I have to investigate this.

I have replaced “basestring” by “str” in argparse.py and it now works!! argparse.py is a software previously installed for my data reduction.
Thank you very much for your help.