Re: Qt runtime issue on python 3 + patch

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>
Cc: Asser Schrøder Femø <asser(dot)femoe(at)gmail(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: Qt runtime issue on python 3 + patch
Date: 2016-06-15 05:16:29
Message-ID: CAG7mmozo4-Kxcmwc18C29Gnyfh5zHU-KP74jdC8aOQ-FuE86=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Surinder,

On Sat, Jun 11, 2016 at 11:08 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Sat, Jun 11, 2016 at 2:17 PM, Asser Schrøder Femø
> <asser(dot)femoe(at)gmail(dot)com> wrote:
> > Hello pgadmin hackers,
> >
> > I checked out the newly released beta and wanted to see how easy it
> would be
> > to package for Arch Linux, but ran into this error with the Qt runtime:
> >
> > Python path:
> >
> "/home/asser/.virtualenvs/pgadmin4-python34/lib/python3.4/site-packages;/home/asser/src/pgadmin4-beta1/web"
> > Webapp path: "/home/asser/projects/pgadmin4/web/pgAdmin4.py"
> > Traceback (most recent call last):
> > File "/home/asser/projects/pgadmin4/web/pgAdmin4.py", line 23, in
> <module>
> > import config
> > File "/home/asser/projects/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: 'str' does not support the buffer interface
> > "Failed to launch the application server, server thread exiting."
> >
> > According to Stackoverflow, exchanging PyBytes_FromString with
> > PyUnicode_DecodeFSDefault when building the pythonpath makes it work
> again
> > (see attached diff). I don't know why though, perhaps somebody will be
> able
> > to enlighten me :-)
> >
> > Same issue and fix on Python 3.4 and 3.5 on Arch Linux. I don't know if
> the
> > patch has any complications on other platforms.
>
> If I'm reading the docs right, PyUnicode_DecodeFSDefault was added in
> Python 3.3, so I've tweaked the patch a little (see attached). I know
> the current code has worked on some 3.x versions but I don't know
> which exactly as I don't currently have them here, but I'll bet it was
> 3.2 or below. Ashesh - can you have the most appropriate person from
> the team check this works on 3.0 through 3.5 please?
>
Can you please take a look at it?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> > Thanks for building the successor to pgAdmin3! It already looks good and
> I'm
> > looking forward to further refinement. Hopefully I'll be able to
> contribute
> > a bit along the way.
>
> Cool - many thanks!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Surinder Kumar 2016-06-15 05:18:57 Re: Qt runtime issue on python 3 + patch
Previous Message Surinder Kumar 2016-06-15 05:12:41 Re: pgAdmin 4 commit: Fix query tool horizontal scrolling of results. Fixes