FTP.Connect: "{NameError}name 'password' is not defined"


I have an odd error:

*** Settings ***
Library    RPA.FTP

*** Test Case***
FTP Test
    Connect    user=Markus    password=robot    host=localhost    

I always get an authentication exception. When debugging, I realized that password value is always empty. Is it some kind of security thing? When I set password during debugging, it works.

Somewhere in the caller is error message claiming, that password is an unknown attribute.

What am I missing?

Used lib: rpaframework 6.6 & 6.7.2


That is odd! Just to make sure, I tried that exact snippet with my own FTP server/credentials without issue. What’s especially odd about it is that NameError indicates that something is trying to use an undefined variable, not that it’s just empty :thinking:

We do have some protections on certain keywords, but those are only adjusting RF logging and should not affect the keywords themselves.

Can you share the full traceback of the error so I could see where it’s coming from? If you run robot with --loglevel TRACE, it’ll give much more information on the error.

1 Like

This is not odd, this is embarrasing… Find the mistake in my real setup that produced the error:

*** Variables ***
${CAMUNDA_URL}    http://localhost:8080
${TASK_NAME}    fax_arfchivieren
${HOST}    localhost
${PORT}    8222
${USER}    user
${PASSWORD}    password

I defined the password twice. Took me a day before finding it accidentally.

Thanks for caring!