Error when executing test file

Hello all,

When I try to run a, easy robot file, I get this error :

C:\Users\Utilisateur\Documents\RF>robot tp1.robot
[ ERROR ] Unexpected error: SystemError: <method-wrapper ‘init’ of File object at 0x00000236DED5B310> returned NULL without setting an exception
Traceback (most recent call last):
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\utils\application.py”, line 81, in _execute
rc = self.main(arguments, **options)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\run.py”, line 448, in main
suite = builder.build(*datasources)
~~~~~~~~~~~~~^^^^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\running\builder\builders.py”, line 158, in build
self.rpa).parse(structure)
~~~~~^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\running\builder\builders.py”, line 218, in parse
structure.visit(self)
~~~~~~~~~~~~~~~^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\parsing\suitestructure.py”, line 65, in visit
visitor.visit_file(self)
~~~~~~~~~~~~~~~~~~^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\running\builder\builders.py”, line 223, in visit_file
suite = self._build_suite_file(structure)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\running\builder\builders.py”, line 256, in _build_suite_file
suite = parser.parse_suite_file(source, defaults)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\running\builder\parsers.py”, line 55, in parse_suite_file
model = get_model(self._get_source(source), data_only=True,
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
curdir=self._get_curdir(source), lang=self.lang)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\parsing\parser\parser.py”, line 57, in get_model
return _get_model(get_tokens, source, data_only, curdir, lang)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\parsing\parser\parser.py”, line 85, in _get_model
model = _statements_to_model(statements, source)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\parsing\parser\parser.py”, line 106, in _statements_to_model
root = FileParser(source=source)
~~~~~~~~~~^^^^^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\parsing\parser\fileparser.py”, line 31, in init
super().init(File(source=self._get_path(source)))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\robot\parsing\model\blocks.py”, line 72, in init
super().init()
~~~~~~~~~~~~~~~~^^
SystemError: <method-wrapper ‘init’ of File object at 0x00000236DED5B310> returned NULL without setting an exception

Any idea ?

Thank you for your answers.

Best regards.

You can start by using a stable version of Python. You are using version 3.13 (which is Aplha?).
At least Robot Framework is known to be compatible with version 3.12.

2 Likes

Hello Helio,

Thank u for your reply.

I use RF with version 7.0.

Version of Python : 3.13.0a5 on win32 (–> Alpha = 0a5 I guess)

I think the version of RF is full compatible with Python.

Best regards.

Do u think I should install Python 3.12 instead of 3.13 ?

Finally it works fine with Python 3.12.
Thank u Helio

Just an FYI:

From that version “3.13.0a5”, “3.13.0” is the version number the “a5” is the 5th alpha pre-relese version of “3.13.0”, after the alpha versions comes the beta versions b1, b2, etc and then the release candidates rc1, rc2, etc and then eventually the stable release version which will be just “3.13.0”

If you are running an alpha or beta version expect things to not work, they are not for normal use, they are for python development team to test the new version of python (and anyone else who wants to)

If you run a rc version you can expect most things to work but still should expect that might encounter bugs.

If you just want python to work and you just want robot framework to work so you can test the software you want to test then you should stick with stable python and robot framework versions, stay away from alphas, betas and release candidates.

Dave.

2 Likes

Thank u Dave for additionnal informations.

1 Like