Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r.init() returns false - improved init() error message with v1.44.1, see if that helps #289

Closed
klho-sg opened this issue Aug 10, 2021 · 10 comments
Labels

Comments

@klho-sg
Copy link

klho-sg commented Aug 10, 2021

I installed rpa with

pip install rpa

Then I tried the sample codes but ran into problems immediately.

With this:

import rpa as r
r.__file__**

I get:

'/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/rpa.py'

Then I tried this:

r.init()

I get:

[RPA][ERROR] - following happens when starting TagUI...


False

Please advise. Thanks.

kensoh added a commit that referenced this issue Aug 11, 2021
@kensoh kensoh added the query label Aug 11, 2021
@kensoh
Copy link
Member

kensoh commented Aug 11, 2021

Hi @klho-sg thanks for raising this issue! Can you try doing pip install rpa --upgrade and try again?

I made a change in the error message handling for init() in an updated v1.44 of this package.

Hopefully this will show up some meaningful actionable messages on your system.

@kensoh kensoh changed the title r.init() returns false r.init() returns false - improved init() error message with v1.44, see if that helps Aug 11, 2021
@hokoonleong
Copy link

Thanks. Unfortunately, it gave the exact same error messages.

After the import:

/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/rpa.py

And after the init:

[RPA][ERROR] - following happens when starting TagUI...

False

There is no change in the output.

kensoh added a commit that referenced this issue Aug 12, 2021
@kensoh
Copy link
Member

kensoh commented Aug 12, 2021

Hi @hokoonleong thanks for your feedback, can you do pip install rpa --upgrade and try again?

I made a change in the error message handling for init() in an updated v1.44.1 of this package. Now there should at least be a full command shown, so that you can try running it from command prompt or terminal to see if there is any new clue.

Mine shows something like below when I intentionally introduce an error in the TagUI engine -

[RPA][ERROR] - following happens when starting TagUI...

The following command is executed to start TagUI -
"/Users/user/.tagui/src/tagui" rpa_python chrome

It leads to following output when starting TagUI -
Could not open input file: fake_name.php
ERROR - automation aborted due to above

@kensoh kensoh changed the title r.init() returns false - improved init() error message with v1.44, see if that helps r.init() returns false - improved init() error message with v1.44.1, see if that helps Aug 12, 2021
@klho-sg
Copy link
Author

klho-sg commented Aug 13, 2021

This is the error message:

[RPA][INFO] - setting up TagUI for use in your Python environment
[RPA][INFO] - downloading TagUI (~200MB) and unzipping to below folder...
[RPA][INFO] - /Users/user
[RPA][INFO] - done. syncing TagUI with stable cutting edge version
[RPA][INFO] - downloading latest PhantomJS to fix OpenSSL issue
[RPA][INFO] - TagUI now ready for use in your Python environment
[RPA][ERROR] - following happens when starting TagUI...

The following command is executed to start TagUI -
"/Users/user/.tagui/src/tagui" rpa_python chrome

It leads to following output when starting TagUI -

False

Then the next cell produces these errors:

[RPA][ERROR] - use init() before using url()
[RPA][ERROR] - use init() before using type()
[RPA][ERROR] - use init() before using read()

[RPA][ERROR] - use init() before using click()
[RPA][ERROR] - use init() before using snap()
[RPA][ERROR] - use init() before using snap()
[RPA][ERROR] - use init() before using url()
[RPA][ERROR] - use init() before using type()
[RPA][ERROR] - use init() before using snap()
[RPA][ERROR] - use init() before using close()

False

@kensoh
Copy link
Member

kensoh commented Aug 13, 2021

Try running below command from where the rpa_python file is created and see if there is more clues what happened -

"/Users/user/.tagui/src/tagui" rpa_python chrome

@klho-sg
Copy link
Author

klho-sg commented Aug 13, 2021

/Users/user/.tagui/src/tagui rpa_python_1.44.1 chrome
ERROR - use .tagui .js .txt or no extension for flow filename
ERROR - automation aborted due to above
user@mac .tagui %

@kensoh
Copy link
Member

kensoh commented Aug 13, 2021

Hi @klho-sg you have copy or type the wrong command, the command I wrote above is

"/Users/user/.tagui/src/tagui" rpa_python chrome

Type above in the folder where you have the rpa_python file. Usually that is where your Python script is.

@kensoh
Copy link
Member

kensoh commented Aug 13, 2021

You can copy and paste above line (change user to your username). Hopefully running manually can show up the error.

@klho-sg
Copy link
Author

klho-sg commented Aug 13, 2021

Sorry, I misinterpreted your instructions. It appears that Chrome is not where rpa expects it to be.

I have solved the problem. I placed Chrome in a non-standard location. I have moved it back to the default folder and it working now. Thanks.

@klho-sg klho-sg closed this as completed Aug 13, 2021
@kensoh
Copy link
Member

kensoh commented Aug 13, 2021

No probs, thanks @klho-sg for raising this! And improving the error message for failed init() for future users :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants