You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RPA Python not working in MacOS Monterey - PHP removed, install PHP this way #335
I just upgraded to MacOS Monterey and my previous RPA Python code no longer works. I am using RPA to open a website and now I get this:
I am using a Jupyter notebook.
import rpa as r
r.init(visual_automation = True)
r.url('https://www.yahoo.com')
r.close()
[RPA][ERROR] - following happens when starting TagUI...
[RPA][ERROR] - use init() before using url()
[RPA][ERROR] - use init() before using close()
False
Solution for now is to install PHP manually, unless this can be automated (I don't think so, need password to run homebrew) or co-packaged. Below will install Homebrew package manager, then install PHP which is required to run the rpa package.
changed the title [-]RPA Python not working in MacOS Monterey[/-][+]RPA Python not working in MacOS Monterey - PHP has been removed, try this to install PHP[/+]on Dec 9, 2021
changed the title [-]RPA Python not working in MacOS Monterey - PHP has been removed, try this to install PHP[/-][+]RPA Python not working in MacOS Monterey - PHP is removed, try this to install PHP[/+]on Dec 9, 2021
changed the title [-]RPA Python not working in MacOS Monterey - PHP is removed, try this to install PHP[/-][+]RPA Python not working in MacOS Monterey - PHP has been removed, install PHP this way[/+]on Dec 9, 2021
changed the title [-]RPA Python not working in MacOS Monterey - PHP has been removed, install PHP this way[/-][+]RPA Python not working in MacOS Monterey - PHP removed, install PHP this way[/+]on Jan 11, 2022
Adding a note that upstream TagUI has a fix for newer PHP (eg v8.1.1) which has some problem with the code used to process datatables and object repositories. However, this is not needed here because for the Python package, those blocks of code are never executed (no concept of datatables or object repositories here).
what i should do with the @kensoh
first ,i have donwload php this is th version
(Machine_Learning) @macbook-pro ~ % php -v
PHP 8.4.1 (cli) (built: Nov 20 2024 09:48:35) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Zend OPcache v8.4.1, Copyright (c), by Zend Technologies
scond,i download java and amazon corretto
then i run my code;
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/Users//.tagui/src/tagui" rpa_python chrome
It leads to following output when starting TagUI -
/Users//.tagui/src/tagui: line 256: php: command not found
Unable to open file: /Users/hollandweng/Documents/PythonCode/RPA/rpa_python.js
phantomjs://code/bootstrap.js:113 in __die
Unable to load script /Users//Documents/PythonCode/RPA/rpa_python.js; check file syntax
phantomjs://code/bootstrap.js:113 in __die
[RPA][ERROR] - unknown error encountered
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/Users//.tagui/src/tagui" rpa_python chrome
It leads to following output when starting TagUI -
/Users/hollandweng/.tagui/src/tagui: line 256: php: command not found
Unable to open file: /Users//Documents/PythonCode/RPA/rpa_python.js
phantomjs://code/bootstrap.js:113 in __die
Unable to load script /Users//Documents/PythonCode/RPA/rpa_python.js; check file syntax
phantomjs://code/bootstrap.js:113 in __die
[RPA][ERROR] - unknown error encountered
[RPA][ERROR] - use init() before using url()
[RPA][ERROR] - use init() before using present()
Hi @HollandWeng I've not come across this situation. The error message says php conmand is not found but you have installed it. Can you try going to the .tagui/src folder and type php to see if the command can be accessed there?
@kensoh Thanks for your reply, I open .tagui/src and search for php, get the following result.
BadOpcodeException.php
BadUriException.php
Base.php
Client.php
ConnectionException.php
Exception.php
sleep.php
tagui_chrome.php
tagui_helper.php
tagui_parse.php
tagui_report.php
tagui_runner.php
tagui_service.php
translate.php
transpose.php.
These files are in that folder,what should I do next? Thank you very much
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/Users/hollandweng/.tagui/src/tagui" rpa_python chrome
It leads to following output when starting TagUI -
ERROR - cannot find Chrome at "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
Chrome is at a non-standard location on your macOS, raise an issue on TagUI GitHub page
[RPA][ERROR] - unknown error encountered
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/Users/hollandweng/.tagui/src/tagui" rpa_python chrome
It leads to following output when starting TagUI -
ERROR - cannot find Chrome at "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
Chrome is at a non-standard location on your macOS, raise an issue on TagUI GitHub page
[RPA][ERROR] - unknown error encountered
[RPA][ERROR] - use init() before using url()
[RPA][ERROR] - use init() before using present()
these kind of error occur when I run my code today @kensoh
I also found that I have download 2 kinds of java(jdk) by mistake, one is from amazon-corretto, and another is from Oracle Corporation. Do I need to delete java or is just have something wrong with PHP ? @kensoh
/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
After I download google chrome, it seems that I can run my rpa code, but the Java icon appearing in the Dock while I'm running a program, is this because I've installed two Java environments, or is it a normal situation? @kensoh
Hi @HollandWeng it looks like you solved the issue. For Java icon yes this is normal, the package uses SikuliX for visual automation and physical keyboard automation. If you use those type of automation in your script, Java will launch because SikuliX is a Java program.
Activity
[-]RPA Python not working in Mac Monterey[/-][+]RPA Python not working in MacOS Monterey[/+]kensoh commentedon Dec 9, 2021
Hi @684efs3, thanks for reporting this!
I'm seeing reports of this issue, due to the new macOS version removing PHP -
https://www.techgenyz.com/2021/06/18/macos-12-monterey-update-built-in-php/
Solution for now is to install PHP manually, unless this can be automated (I don't think so, need password to run homebrew) or co-packaged. Below will install Homebrew package manager, then install PHP which is required to run the rpa package.
Try the above to see if that works. I'm using Mac as well but am still keeping it at Catalina version so I can't replicate.
[-]RPA Python not working in MacOS Monterey[/-][+]RPA Python not working in MacOS Monterey - PHP has been removed, try this to install PHP[/+][-]RPA Python not working in MacOS Monterey - PHP has been removed, try this to install PHP[/-][+]RPA Python not working in MacOS Monterey - PHP is removed, try this to install PHP[/+][-]RPA Python not working in MacOS Monterey - PHP is removed, try this to install PHP[/-][+]RPA Python not working in MacOS Monterey - PHP has been removed, install PHP this way[/+]684efs3 commentedon Dec 12, 2021
Fixed - thank you very much!
[-]RPA Python not working in MacOS Monterey - PHP has been removed, install PHP this way[/-][+]RPA Python not working in MacOS Monterey - PHP removed, install PHP this way[/+]kensoh commentedon Jan 19, 2022
Adding a note that upstream TagUI has a fix for newer PHP (eg v8.1.1) which has some problem with the code used to process datatables and object repositories. However, this is not needed here because for the Python package, those blocks of code are never executed (no concept of datatables or object repositories here).
#335 - update readme on macOS PHP installation
HollandWeng commentedon Dec 16, 2024
what i should do with the @kensoh
first ,i have donwload php this is th version
(Machine_Learning) @macbook-pro ~ % php -v
PHP 8.4.1 (cli) (built: Nov 20 2024 09:48:35) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Zend OPcache v8.4.1, Copyright (c), by Zend Technologies
scond,i download java and amazon corretto
then i run my code;
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/Users//.tagui/src/tagui" rpa_python chrome
It leads to following output when starting TagUI -
/Users//.tagui/src/tagui: line 256: php: command not found
Unable to open file: /Users/hollandweng/Documents/PythonCode/RPA/rpa_python.js
phantomjs://code/bootstrap.js:113 in __die
Unable to load script /Users//Documents/PythonCode/RPA/rpa_python.js; check file syntax
phantomjs://code/bootstrap.js:113 in __die
[RPA][ERROR] - unknown error encountered
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/Users//.tagui/src/tagui" rpa_python chrome
It leads to following output when starting TagUI -
/Users/hollandweng/.tagui/src/tagui: line 256: php: command not found
Unable to open file: /Users//Documents/PythonCode/RPA/rpa_python.js
phantomjs://code/bootstrap.js:113 in __die
Unable to load script /Users//Documents/PythonCode/RPA/rpa_python.js; check file syntax
phantomjs://code/bootstrap.js:113 in __die
[RPA][ERROR] - unknown error encountered
[RPA][ERROR] - use init() before using url()
[RPA][ERROR] - use init() before using present()
kensoh commentedon Dec 26, 2024
Hi @HollandWeng I've not come across this situation. The error message says php conmand is not found but you have installed it. Can you try going to the .tagui/src folder and type php to see if the command can be accessed there?
HollandWeng commentedon Jan 7, 2025
@kensoh Thanks for your reply, I open .tagui/src and search for php, get the following result.
BadOpcodeException.php
BadUriException.php
Base.php
Client.php
ConnectionException.php
Exception.php
sleep.php
tagui_chrome.php
tagui_helper.php
tagui_parse.php
tagui_report.php
tagui_runner.php
tagui_service.php
translate.php
transpose.php.
These files are in that folder,what should I do next? Thank you very much
HollandWeng commentedon Jan 7, 2025
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/Users/hollandweng/.tagui/src/tagui" rpa_python chrome
It leads to following output when starting TagUI -
ERROR - cannot find Chrome at "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
Chrome is at a non-standard location on your macOS, raise an issue on TagUI GitHub page
[RPA][ERROR] - unknown error encountered
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/Users/hollandweng/.tagui/src/tagui" rpa_python chrome
It leads to following output when starting TagUI -
ERROR - cannot find Chrome at "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
Chrome is at a non-standard location on your macOS, raise an issue on TagUI GitHub page
[RPA][ERROR] - unknown error encountered
[RPA][ERROR] - use init() before using url()
[RPA][ERROR] - use init() before using present()
these kind of error occur when I run my code today @kensoh
HollandWeng commentedon Jan 7, 2025
I also found that I have download 2 kinds of java(jdk) by mistake, one is from amazon-corretto, and another is from Oracle Corporation. Do I need to delete java or is just have something wrong with PHP ? @kensoh
/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
HollandWeng commentedon Jan 10, 2025
After I download google chrome, it seems that I can run my rpa code, but the Java icon appearing in the Dock while I'm running a program, is this because I've installed two Java environments, or is it a normal situation? @kensoh
kensoh commentedon Jan 15, 2025
Hi @HollandWeng it looks like you solved the issue. For Java icon yes this is normal, the package uses SikuliX for visual automation and physical keyboard automation. If you use those type of automation in your script, Java will launch because SikuliX is a Java program.