Rfbrowser init (fails downloading chromium

Trying to initialize rfbrowsers fails while trying to download the chromium driver.

My setup:
| OS | Windows 10 Pro (64-bit) |
| Python | 3.9.13 |
| pip | 22.1.1 |
| Robot Framework | 5.0.1 (Python 3.9.13 on win32) |
| rfbrowser | ??? (is recognized in console) |

When I run
> rfbrowser init
the following error gets logged to the console:

Traceback (most recent call last):

File “C:\ManualInstall\python\lib\runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\ManualInstall\python\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\ManualInstall\python\Scripts\rfbrowser.exe_main
.py", line 7, in
File “C:\ManualInstall\python\lib\site-packages\Browser\entry.py”, line 237, in run
rfbrowser_init(args.skip_browsers)
File “C:\ManualInstall\python\lib\site-packages\Browser\entry.py”, line 53, in rfbrowser_init
raise error
File “C:\ManualInstall\python\lib\site-packages\Browser\entry.py”, line 45, in rfbrowser_init
_rfbrowser_init(skip_browser_install, install_file)
File “C:\ManualInstall\python\lib\site-packages\Browser\entry.py”, line 149, in _rfbrowser_init
log_file.write(output)
File “C:\ManualInstall\python\lib\encodings\cp1252.py”, line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: ‘charmap’ codec can’t encode characters in position 1-8: character maps to

All I understand is that there seems to be an encoding problem, but that does feel like a symptom rather than a cause.
Any help would be greatly appreciated.

Kind Regards
Tim

Is the command > rfbrowser init directory-sensitive?
In other words: Do I have to execute it after navigate to particular directory in my console (let’s say my project dir)?
I thought it wouldn’t be, just as pip installs for example.
(As long as I have my PATH-Variables set up correctly and only one python-environment of course)

Interesting, there indeed is at least one bug. For debugging installation type of problems, we made log file writing from init command. Now, for a unknown reason, writing to the log file fails.

The command itself is not folder sensitive, it will use normal Python module search path to find required dependencies. But if your folder where you execute the command has some special characters that might affect encoding.

The code fails when it tries to write output from the node side installation to a file. Unfortunately the error in the writing masks the error. Would you be able to debug the issue more and find what is the problematic thing that causes the error.

Oof.
Thank you for your reply.

Having a problem in the logging process seems… unfortunate.
I would love to do some debugging, but I am way out of my area of expertise here. Can you point me to any debugging tool I might use to get to the ground of this?

As far as I can see the folder directory does not contain special characters:

Execution path:
“C:”

Path of the Init-Python-File:
“C:\ManualInstall\python\Lib\site-packages\Browser_init_.py”

Path of the Python-Executable:
“C:\ManualInstall\python\python-3.9.13-amd64.exe”

It is not only the Python path, but also NodeJS installation may affect.

No special characters here either:

C:\ManualInstall\nodejs

Most of my installtions live in “ManualInstall” containing the substructures they create during installation.

Interesting, I know how to fix it or at least workaround the problem, so that it does not fail the installation in this case. Could you raise an issue to our GitHub project, so that I do not forget the problem.

I opened an issue on git hub. Here is the link:

1 Like