Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pgAdmin 4 v3.0 Query Tool Initialize Error

Tags:

pgadmin-4

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

like image 729
scook Avatar asked May 15 '18 16:05

scook


People also ask

What is query tool in pgadmin 4?

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.

What's new in pgadmin for Windows?

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.

How do I show or hide the queries generated by pgadmin?

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.

Why can't I access pgadmin4 from my Web server?

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:


1 Answers

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.

like image 153
m2web Avatar answered Sep 28 '22 12:09

m2web