12

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

scook
  • 159
  • 1
  • 2
  • 9

2 Answers2

10

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.

m2web
  • 737
  • 6
  • 15
  • Thanks for the help! I was able to get it working again. – scook May 29 '18 at 15:51
  • @NLxDoDge Neither for me. – Jagger Jun 27 '18 at 03:19
  • For me the solution was to change from localhost to 127.0.0.1 – gshilin Jul 18 '18 at 08:01
  • I cannot see this directory in Windows. Can you please suggest path for Windows? Thanks – S.Perera Jul 23 '18 at 09:49
  • 1
    In Windows it's "C:\Program Files (x86)\pgAdmin 4\v3\web" for me, and there you have the config.py file. And don't forget to restart your PgAdmin from tray. – Monomachus Jul 24 '18 at 05:51
  • Just want to mentioned, it worked for me once (can query) in windows 10, but after restart my system, I get the same error, and never succeed to start the Query tool again. As we use PostgreSQL 9.3, I end up to changed to use pgAdmin3. – zhihong Sep 05 '18 at 13:24
4

Try resetting your layout, under the File entry in the top menu. I suspect that there's something in the layout settings saved under v2.0 that's incompatible with the v3.0 release.

Jeff Seifert
  • 328
  • 1
  • 8