Thread: pgadmin4: Server does not launch
FWIW I can build a pgAdmin4 file ok on openSUSE linux, but on launch I see: ~/pgadmin4/runtime> ./pgAdmin4 Python path: "/usr/lib64/python2.7" Webapp path: "/home/colin/pgadmin4/web/pgAdmin4.py" Traceback (most recent call last): File "/home/colin/pgadmin4/web/pgAdmin4.py", line 23, in <module> import config File "/home/colin/pgadmin4/web/config.py", line 255, in <module> from config_local import * File "<frozen importlib._bootstrap>", line 2237, in _find_and_load File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 2164, in _find_spec File "<frozen importlib._bootstrap>", line 1940, in find_spec File "<frozen importlib._bootstrap>", line 1914, in _get_spec File "<frozen importlib._bootstrap>", line 2049, in find_spec File "<frozen importlib._bootstrap>", line 53, in _path_join File "<frozen importlib._bootstrap>", line 53, in <listcomp> TypeError: Type str doesn't support the buffer API "Failed to launch the application server, server thread exiting."
Hi,
What do you have in config_local. py?
It is failing to load that file.
--
Thanks & Regards,
Ashesh Vashi
FWIW I can build a pgAdmin4 file ok on openSUSE linux, but on launch I see:
~/pgadmin4/runtime> ./pgAdmin4
Python path: "/usr/lib64/python2.7"
Webapp path: "/home/colin/pgadmin4/web/pgAdmin4.py"
Traceback (most recent call last):
File "/home/colin/pgadmin4/web/pgAdmin4.py", line 23, in <module>
import config
File "/home/colin/pgadmin4/web/config.py", line 255, in <module>
from config_local import *
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 2164, in _find_spec
File "<frozen importlib._bootstrap>", line 1940, in find_spec
File "<frozen importlib._bootstrap>", line 1914, in _get_spec
File "<frozen importlib._bootstrap>", line 2049, in find_spec
File "<frozen importlib._bootstrap>", line 53, in _path_join
File "<frozen importlib._bootstrap>", line 53, in <listcomp>
TypeError: Type str doesn't support the buffer API
"Failed to launch the application server, server thread exiting."
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Hi,
What do you have in config_local. py?
It is failing to load that file.
--
Thanks & Regards,
Ashesh VashiOn Jun 8, 2016 17:45, "Colin Beckingham" <colbec@kingston.net> wrote:FWIW I can build a pgAdmin4 file ok on openSUSE linux, but on launch I see:
~/pgadmin4/runtime> ./pgAdmin4
Python path: "/usr/lib64/python2.7"
Webapp path: "/home/colin/pgadmin4/web/pgAdmin4.py"
Traceback (most recent call last):
File "/home/colin/pgadmin4/web/pgAdmin4.py", line 23, in <module>
import config
File "/home/colin/pgadmin4/web/config.py", line 255, in <module>
from config_local import *
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 2164, in _find_spec
File "<frozen importlib._bootstrap>", line 1940, in find_spec
File "<frozen importlib._bootstrap>", line 1914, in _get_spec
File "<frozen importlib._bootstrap>", line 2049, in find_spec
File "<frozen importlib._bootstrap>", line 53, in _path_join
File "<frozen importlib._bootstrap>", line 53, in <listcomp>
TypeError: Type str doesn't support the buffer API
"Failed to launch the application server, server thread exiting."
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
On Jun 8, 2016 18:53, "Colin Beckingham" <colbec@kingston.net> wrote:
>
> Thanks. config_local.py did not exist. I created one in the "web" directory, with entries for SECRET_KEY, SECURITY_PASSWORD_SALT and CSRF_SESSION_KEY (with fabricated entry values) as detailed in the code in https://github.com/asheshv/pgadmin4/blob/master/web/pgAdmin4.py, redid qmake, make clean and make, but same result on launch of pgAdmin4. Strange that I did not see the print comment on programme's fail to see the file.
Did you run setup.py before launching the runtime?
-- Ashesh
>
>
> On 08/06/16 08:49, Ashesh Vashi wrote:
>>
>> Hi,
>>
>> What do you have in config_local. py?
>>
>> It is failing to load that file.
>>
>> --
>> Thanks & Regards,
>> Ashesh Vashi
>>
>> On Jun 8, 2016 17:45, "Colin Beckingham" <colbec@kingston.net> wrote:
>>>
>>> FWIW I can build a pgAdmin4 file ok on openSUSE linux, but on launch I see:
>>>
>>> ~/pgadmin4/runtime> ./pgAdmin4
>>> Python path: "/usr/lib64/python2.7"
>>> Webapp path: "/home/colin/pgadmin4/web/pgAdmin4.py"
>>> Traceback (most recent call last):
>>> File "/home/colin/pgadmin4/web/pgAdmin4.py", line 23, in <module>
>>> import config
>>> File "/home/colin/pgadmin4/web/config.py", line 255, in <module>
>>> from config_local import *
>>> File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
>>> File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
>>> File "<frozen importlib._bootstrap>", line 2164, in _find_spec
>>> File "<frozen importlib._bootstrap>", line 1940, in find_spec
>>> File "<frozen importlib._bootstrap>", line 1914, in _get_spec
>>> File "<frozen importlib._bootstrap>", line 2049, in find_spec
>>> File "<frozen importlib._bootstrap>", line 53, in _path_join
>>> File "<frozen importlib._bootstrap>", line 53, in <listcomp>
>>> TypeError: Type str doesn't support the buffer API
>>> "Failed to launch the application server, server thread exiting."
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>
On Wed, Jun 8, 2016 at 2:46 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote: > > On Jun 8, 2016 18:53, "Colin Beckingham" <colbec@kingston.net> wrote: >> >> Thanks. config_local.py did not exist. I created one in the "web" >> directory, with entries for SECRET_KEY, SECURITY_PASSWORD_SALT and >> CSRF_SESSION_KEY (with fabricated entry values) as detailed in the code in >> https://github.com/asheshv/pgadmin4/blob/master/web/pgAdmin4.py, redid >> qmake, make clean and make, but same result on launch of pgAdmin4. Strange >> that I did not see the print comment on programme's fail to see the file. > > Did you run setup.py before launching the runtime? If I had to guess, there's a mis-match between the Python environment that the runtime is being built in, and the one Colin thinks he's configured. I would start by running the web-app and ignoring the runtime; 1) cd web 2) Create config_local.py 3) python pgAdmin4.py 4) Point the browser at the URL given -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On 08/06/16 09:57, Dave Page wrote: > On Wed, Jun 8, 2016 at 2:46 PM, Ashesh Vashi > <ashesh.vashi@enterprisedb.com> wrote: >> On Jun 8, 2016 18:53, "Colin Beckingham" <colbec@kingston.net> wrote: >>> Thanks. config_local.py did not exist. I created one in the "web" >>> directory, with entries for SECRET_KEY, SECURITY_PASSWORD_SALT and >>> CSRF_SESSION_KEY (with fabricated entry values) as detailed in the code in >>> https://github.com/asheshv/pgadmin4/blob/master/web/pgAdmin4.py, redid >>> qmake, make clean and make, but same result on launch of pgAdmin4. Strange >>> that I did not see the print comment on programme's fail to see the file. >> Did you run setup.py before launching the runtime? > If I had to guess, there's a mis-match between the Python environment > that the runtime is being built in, and the one Colin thinks he's > configured. > > I would start by running the web-app and ignoring the runtime; > > 1) cd web > 2) Create config_local.py > 3) python pgAdmin4.py > 4) Point the browser at the URL given > Thanks to Dave and Ashesh for comments. On further investigation I find that I have led myself astray by having only pip for python 3 installed, with a generic link to pip that always called pip3. So thinking myself running python2 but getting info for python3 does not help. Likely by the time I have this sorted out my error message will be different again, so will post back at that time.
On 08/06/16 09:57, Dave Page wrote: > On Wed, Jun 8, 2016 at 2:46 PM, Ashesh Vashi > <ashesh.vashi@enterprisedb.com> wrote: >> On Jun 8, 2016 18:53, "Colin Beckingham" <colbec@kingston.net> wrote: >>> Thanks. config_local.py did not exist. I created one in the "web" >>> directory, with entries for SECRET_KEY, SECURITY_PASSWORD_SALT and >>> CSRF_SESSION_KEY (with fabricated entry values) as detailed in the code in >>> https://github.com/asheshv/pgadmin4/blob/master/web/pgAdmin4.py, redid >>> qmake, make clean and make, but same result on launch of pgAdmin4. Strange >>> that I did not see the print comment on programme's fail to see the file. >> Did you run setup.py before launching the runtime? > If I had to guess, there's a mis-match between the Python environment > that the runtime is being built in, and the one Colin thinks he's > configured. > > I would start by running the web-app and ignoring the runtime; > > 1) cd web > 2) Create config_local.py > 3) python pgAdmin4.py > 4) Point the browser at the URL given > Progress. With clean pip2 all the requirements seem to be ok. Ran step 3 as above and was challenged for an email and password, entered, then error with psycopg2. In the requirements check the output found a psycopg2, removed it and then installed the new one and seemed happy. ~/pgadmin4/web> python pgAdmin4.py Traceback (most recent call last): File "pgAdmin4.py", line 53, in <module> app = create_app() File "/home/colin/pgadmin4/web/pgadmin/__init__.py", line 216, in create_app driver.init_app(app) File "/home/colin/pgadmin4/web/pgadmin/utils/driver/__init__.py", line 39, in init_app DriverRegistry.load_drivers() File "/home/colin/pgadmin4/web/pgadmin/utils/driver/registry.py", line 87, in load_drivers module = import_module(module_name) File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/home/colin/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line 21, in <module> import psycopg2 File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 67, in <module> import psycopg2.extensions as _ext File "/usr/lib64/python2.7/site-packages/psycopg2/extensions.py", line 61, in <module> from psycopg2._psycopg import ISQLQuote, Notify, Diagnostics, Column ImportError: cannot import name Column
On Jun 8, 2016 20:54, "Colin Beckingham" <colbec@kingston.net> wrote:
>
>
>
> On 08/06/16 09:57, Dave Page wrote:
>>
>> On Wed, Jun 8, 2016 at 2:46 PM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>>>
>>> On Jun 8, 2016 18:53, "Colin Beckingham" <colbec@kingston.net> wrote:
>>>>
>>>> Thanks. config_local.py did not exist. I created one in the "web"
>>>> directory, with entries for SECRET_KEY, SECURITY_PASSWORD_SALT and
>>>> CSRF_SESSION_KEY (with fabricated entry values) as detailed in the code in
>>>> https://github.com/asheshv/pgadmin4/blob/master/web/pgAdmin4.py, redid
>>>> qmake, make clean and make, but same result on launch of pgAdmin4. Strange
>>>> that I did not see the print comment on programme's fail to see the file.
>>>
>>> Did you run setup.py before launching the runtime?
>>
>> If I had to guess, there's a mis-match between the Python environment
>> that the runtime is being built in, and the one Colin thinks he's
>> configured.
>>
>> I would start by running the web-app and ignoring the runtime;
>>
>> 1) cd web
>> 2) Create config_local.py
>> 3) python pgAdmin4.py
>> 4) Point the browser at the URL given
>>
> Progress. With clean pip2 all the requirements seem to be ok. Ran step 3 as above and was challenged for an email and password, entered, then error with psycopg2. In the requirements check the output found a psycopg2, removed it and then installed the new one and seemed happy.
>
> ~/pgadmin4/web> python pgAdmin4.py
>
> Traceback (most recent call last):
> File "pgAdmin4.py", line 53, in <module>
> app = create_app()
> File "/home/colin/pgadmin4/web/pgadmin/__init__.py", line 216, in create_app
> driver.init_app(app)
> File "/home/colin/pgadmin4/web/pgadmin/utils/driver/__init__.py", line 39, in init_app
> DriverRegistry.load_drivers()
> File "/home/colin/pgadmin4/web/pgadmin/utils/driver/registry.py", line 87, in load_drivers
> module = import_module(module_name)
> File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
> __import__(name)
> File "/home/colin/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line 21, in <module>
> import psycopg2
> File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 67, in <module>
> import psycopg2.extensions as _ext
> File "/usr/lib64/python2.7/site-packages/psycopg2/extensions.py", line 61, in <module>
> from psycopg2._psycopg import ISQLQuote, Notify, Diagnostics, Column
> ImportError: cannot import name Column
It seems the problem is with the psycopg2 library.
It may not be installed properly.
Please run python in interactive mode.
And, import psycopg2.
--
Thanks & Regards,
Ashesh Vashi
>
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
Right, forced an upgrade via pip2 and it overwrote the existing psycopg2. In interactive mode psycopg2 now imports correctly.
On Jun 8, 2016 20:54, "Colin Beckingham" <colbec@kingston.net> wrote:
>
>
>
> On 08/06/16 09:57, Dave Page wrote:
>>
>> On Wed, Jun 8, 2016 at 2:46 PM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>>>
>>> On Jun 8, 2016 18:53, "Colin Beckingham" <colbec@kingston.net> wrote:
>>>>
>>>> Thanks. config_local.py did not exist. I created one in the "web"
>>>> directory, with entries for SECRET_KEY, SECURITY_PASSWORD_SALT and
>>>> CSRF_SESSION_KEY (with fabricated entry values) as detailed in the code in
>>>> https://github.com/asheshv/pgadmin4/blob/master/web/pgAdmin4.py, redid
>>>> qmake, make clean and make, but same result on launch of pgAdmin4. Strange
>>>> that I did not see the print comment on programme's fail to see the file.
>>>
>>> Did you run setup.py before launching the runtime?
>>
>> If I had to guess, there's a mis-match between the Python environment
>> that the runtime is being built in, and the one Colin thinks he's
>> configured.
>>
>> I would start by running the web-app and ignoring the runtime;
>>
>> 1) cd web
>> 2) Create config_local.py
>> 3) python pgAdmin4.py
>> 4) Point the browser at the URL given
>>
> Progress. With clean pip2 all the requirements seem to be ok. Ran step 3 as above and was challenged for an email and password, entered, then error with psycopg2. In the requirements check the output found a psycopg2, removed it and then installed the new one and seemed happy.
>
> ~/pgadmin4/web> python pgAdmin4.py
>
> Traceback (most recent call last):
> File "pgAdmin4.py", line 53, in <module>
> app = create_app()
> File "/home/colin/pgadmin4/web/pgadmin/__init__.py", line 216, in create_app
> driver.init_app(app)
> File "/home/colin/pgadmin4/web/pgadmin/utils/driver/__init__.py", line 39, in init_app
> DriverRegistry.load_drivers()
> File "/home/colin/pgadmin4/web/pgadmin/utils/driver/registry.py", line 87, in load_drivers
> module = import_module(module_name)
> File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
> __import__(name)
> File "/home/colin/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line 21, in <module>
> import psycopg2
> File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 67, in <module>
> import psycopg2.extensions as _ext
> File "/usr/lib64/python2.7/site-packages/psycopg2/extensions.py", line 61, in <module>
> from psycopg2._psycopg import ISQLQuote, Notify, Diagnostics, Column
> ImportError: cannot import name ColumnIt seems the problem is with the psycopg2 library.
It may not be installed properly.Please run python in interactive mode.
And, import psycopg2.--
Thanks & Regards,
Ashesh Vashi
>
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
Now, when I run step 3 from web directory the command is accepted but there is no output. The command appears to hang - ctrl C will interrupt it cleanly, I can see from Gnome monitor that a python instance has started but all cores are quiet at minimum usage. Not sure what I should expect to see at this point. Runtime pgAdmin4 still not working.
On Wed, Jun 8, 2016 at 5:03 PM, Colin Beckingham <colbec@kingston.net> wrote: > > Right, forced an upgrade via pip2 and it overwrote the existing psycopg2. In > interactive mode psycopg2 now imports correctly. > Now, when I run step 3 from web directory the command is accepted but there > is no output. The command appears to hang - ctrl C will interrupt it > cleanly, I can see from Gnome monitor that a python instance has started but > all cores are quiet at minimum usage. Not sure what I should expect to see > at this point. Runtime pgAdmin4 still not working. I suspect it's actually running, but we're so used to seeing a ton of debug output that we forget that if debug is off, not much happens (happened to me earlier!). Try pointing your browser at http://127.0.0.1:5050. To see all the stuff we see, add the following to config_local.py and restart: CONSOLE_LOG_LEVEL = DEBUG You can also send a copy of the output to a file, e.g. LOG_FILE = '/Users/dpage/pgadmin4.log' FILE_LOG_LEVEL = DEBUG Please bear in mind that you're effectively in "developer" mode here. The Windows/Mac packages I just announced should just run once installed. Even the PIP package (pretty basic right now) will make this a little easier, though really that's intended for people who want to run a WSGI server on a platform we don't have native packages for. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On 08/06/16 12:22, Dave Page wrote: > On Wed, Jun 8, 2016 at 5:03 PM, Colin Beckingham <colbec@kingston.net> wrote: >> Right, forced an upgrade via pip2 and it overwrote the existing psycopg2. In >> interactive mode psycopg2 now imports correctly. >> Now, when I run step 3 from web directory the command is accepted but there >> is no output. The command appears to hang - ctrl C will interrupt it >> cleanly, I can see from Gnome monitor that a python instance has started but >> all cores are quiet at minimum usage. Not sure what I should expect to see >> at this point. Runtime pgAdmin4 still not working. > I suspect it's actually running, but we're so used to seeing a ton of > debug output that we forget that if debug is off, not much happens > (happened to me earlier!). > > Try pointing your browser at http://127.0.0.1:5050. > > To see all the stuff we see, add the following to config_local.py and restart: > > CONSOLE_LOG_LEVEL = DEBUG > > You can also send a copy of the output to a file, e.g. > > LOG_FILE = '/Users/dpage/pgadmin4.log' > FILE_LOG_LEVEL = DEBUG > > Please bear in mind that you're effectively in "developer" mode here. > The Windows/Mac packages I just announced should just run once > installed. Even the PIP package (pretty basic right now) will make > this a little easier, though really that's intended for people who > want to run a WSGI server on a platform we don't have native packages > for. > Not a problem, Dave, my presence here is to try to give feedback. Using this URL lets me straight in; as you say the server is there, waiting for a connection. As a bit of feedback on the pgadmin4 release just announced, for users coming at the installation via the wheel file on URL https://www.pgadmin.org/download/, the pip install works fine on this machine, but there is no guidance as to what to do with it once it is there. pip says that pgadmin4 and psycopg are ready, but there is nothing about what to do next to launch it as a bridge into the dev documentation already online. I guess that comes later, or I missed it.
On Wed, Jun 8, 2016 at 5:44 PM, Colin Beckingham <colbec@kingston.net> wrote: > > > On 08/06/16 12:22, Dave Page wrote: >> >> On Wed, Jun 8, 2016 at 5:03 PM, Colin Beckingham <colbec@kingston.net> >> wrote: >>> >>> Right, forced an upgrade via pip2 and it overwrote the existing psycopg2. >>> In >>> interactive mode psycopg2 now imports correctly. >>> Now, when I run step 3 from web directory the command is accepted but >>> there >>> is no output. The command appears to hang - ctrl C will interrupt it >>> cleanly, I can see from Gnome monitor that a python instance has started >>> but >>> all cores are quiet at minimum usage. Not sure what I should expect to >>> see >>> at this point. Runtime pgAdmin4 still not working. >> >> I suspect it's actually running, but we're so used to seeing a ton of >> debug output that we forget that if debug is off, not much happens >> (happened to me earlier!). >> >> Try pointing your browser at http://127.0.0.1:5050. >> >> To see all the stuff we see, add the following to config_local.py and >> restart: >> >> CONSOLE_LOG_LEVEL = DEBUG >> >> You can also send a copy of the output to a file, e.g. >> >> LOG_FILE = '/Users/dpage/pgadmin4.log' >> FILE_LOG_LEVEL = DEBUG >> >> Please bear in mind that you're effectively in "developer" mode here. >> The Windows/Mac packages I just announced should just run once >> installed. Even the PIP package (pretty basic right now) will make >> this a little easier, though really that's intended for people who >> want to run a WSGI server on a platform we don't have native packages >> for. >> > Not a problem, Dave, my presence here is to try to give feedback. > Using this URL lets me straight in; as you say the server is there, waiting > for a connection. > > As a bit of feedback on the pgadmin4 release just announced, for users > coming at the installation via the wheel file on URL > https://www.pgadmin.org/download/, the pip install works fine on this > machine, but there is no guidance as to what to do with it once it is there. > pip says that pgadmin4 and psycopg are ready, but there is nothing about > what to do next to launch it as a bridge into the dev documentation already > online. I guess that comes later, or I missed it. Yeah, I'm planning to do that once I've reworked some of the PIP code. Thanks for the feedback! -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company