I recently got a new laptop and downloaded pgAdmin 4 v3.0. Before now, I had been running pgAdmin 4 v2.0 with no issues. However, now whenever I try to open the Query Tool (just by going through the drop down Tools menu), I receive the error message "Query Tool Initialize Error". The Query Tool worked for two or three queries after the initial error message, but has been returning the error message whenever selected in the days since then. I am able to create and edit tables and views, but only by right clicking the icons on the left-hand side of the screen. I tried uninstalling and reinstalling pgAdmin to no effect.
Has anyone encountered this issue before?
Query Tool Initialize Error
Warning: This documentation is for a pre-release version of pgAdmin 4 The Query Tool is a powerful, feature-rich environment that allows you to execute arbitrary SQL commands and review the result set.
The desktop runtime now runs as a system tray application and utilises the browser on the system to display pgAdmin. This resolves numerous bugs and issues caused by QtWebKit/QtWebEngine. Data can now be sorted in edit mode in the Query Tool.
You can show or hide the queries generated internally by pgAdmin (during ‘View/Edit Data’ or ‘Save Data’ operations). To erase the content of the Query History tab, select Clear history from the Clear drop-down menu. Query History is maintained across sessions for each database on a per-user basis when running in Query Tool mode.
If your web server (unless you are accessing pgadmin4 port directly) is proxying the correct port with all correct options. I use nginx and this is working fine with:
In Ubuntu 16.04 I updated my pgAdmin 4 version 2.1 to 3.0 and saw the same thing when attempting to open the Query Tool through the drop down menus. While this is not a fix, instead of browsing to http://12.70.0.1:5050 I changed the URL to http://localhost:5050. Then I was able to use the Query Tool via the drop down menus.
Edit: What I did was edit the pgAdmin4/lib/python3.5/site-packages/pgadmin4/config.py file by updating the line:
DEFAULT_SERVER = '127.0.0.1'
to
DEFAULT_SERVER = 'localhost'
Now when I open pgAdmin, the Query Tool works accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With