On Wed, 2016-11-30 at 21:56 +0300, Devrim Gündüz wrote: > On Tue, 2016-11-29 at 10:42 +0100, Peter Juhasz wrote: > > > > I've removed the previous pgadmin4-* packages then installed the > > new > > ones. > > That is not enough -- can you please also delete the directories that > I > mentioned here? > > https://www.postgresql.org/message-id/1479206529.4684.18.camel%40gund > uz.org > > That error comes when these dirs are not removed. The previous > packages were > broken, and we need to get rid of all old stuff prior to installing > new ones. > > Regards,
I've removed the package, deleted those directories, then reinstalled the package. It didn't solve the problem - as I expected it wouldn't. As I've explained in my previous email, the problem is that the runtime application never learns the location of the python server (pgAdmin4.py) in the first place because it doesn't load the config file. On Linux, the QSettings class searches for the application's config file in the following locations: $HOME/.config/$ORGANIZATION_NAME/$APP_NAME.conf $HOME/.config/$ORGANIZATION_NAME.conf /etc/xdg/$ORGANIZATION_NAME/$APP_NAME.conf /etc/xdg/$ORGANIZATION_NAME.conf in this order. For pgAdmin4, on my system, these translate to /home/pjuhasz/.config/pgAdmin Development Team/pgAdmin 4.conf /home/pjuhasz/.config/pgAdmin Development Team.conf /etc/xdg/pgAdmin Development Team/pgAdmin 4.conf /etc/xdg/pgAdmin Development Team.conf None of these exist so the application displays the error popup and crashes. (More precisely, it displays the popup at pgAdmin4.cpp:87, so it doesn't even get the chance to display the other popup where the user could give the correct application/python path.) At this point I'll reiterate more bluntly that application/directory names with spaces in them are ugly, look out of place and potential sources of error. The rpm package installs two files that could be candidates for config files: /usr/pgadmin4-v1/runtime/pgadmin.ini /etc/pgAdmin\ Development\ Team/pgAdmin4.conf The first one is never accessed at all, its contents are misleading, so it's apparently there to confuse the user. The second one is almost good, except it should go in /etc/xdg, not in /etc. Apparently the ApplicationPath setting must be a relative path, absolute paths don't work (because of a bug at Server.cpp:221 where the code just blindly concatenates the config's Application path to the runtime's own directory - if Application path is an absolute path, it should be used as is). So after you copy the config file to its expected position under /etc/xdg, the contents must be modified as well: [General] ApplicationPath=../../../../../usr/lib/python3.5/site-packages/pgadmin4-web PythonPath="/usr/lib64/python3.5/site-packages;/usr/lib/python3.5/site-packages" Note the five ..'s. Having done this, the pgadmin4 command finally works! I hope this helps. Best regards, Peter Juhasz -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support