gramps 5 + postgresql

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

gramps 5 + postgresql

John Allen
I run my own servers. I have been trying to connect Gramps 5 to the
existing postgresql server.

However, when I try to setup Gramps 5 on windows 7 with postgresql it
fails as psycopg is missing.

Anybody know how to add/install the missing bits.

John A


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

Josip
3.6.2017. u 6:05, John je napisao/la:
> I run my own servers. I have been trying to connect Gramps 5 to the
> existing postgresql server.
>
> However, when I try to setup Gramps 5 on windows 7 with postgresql it
> fails as psycopg is missing.
>
> Anybody know how to add/install the missing bits.
>

Which gramps and postgresql version?
You need https://pypi.python.org/pypi/psycopg2/2.7.1

--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

John Allen
GrampsAIO64-5.0.0-alpha1-517-g882c37a running under Windows 7.
I have installed python 3.6 No IDE.
Ran pip install psycopg2 - this says it succeeded, but I cannot ind
psyscopg2. says its 2.7.1

Postgresql 9.6.3-3 running under Debian testing.
listening on ipv4 and ipv6.

On 6/3/17 8:02 AM, Josip wrote:

> 3.6.2017. u 6:05, John je napisao/la:
>> I run my own servers. I have been trying to connect Gramps 5 to the
>> existing postgresql server.
>>
>> However, when I try to setup Gramps 5 on windows 7 with postgresql it
>> fails as psycopg is missing.
>>
>> Anybody know how to add/install the missing bits.
>>
>
> Which gramps and postgresql version?
> You need https://pypi.python.org/pypi/psycopg2/2.7.1
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

Josip
4.6.2017. u 5:13, John je napisao/la:

> GrampsAIO64-5.0.0-alpha1-517-g882c37a running under Windows 7.
> I have installed python 3.6 No IDE.
> Ran pip install psycopg2 - this says it succeeded, but I cannot ind
> psyscopg2. says its 2.7.1
>
> Postgresql 9.6.3-3 running under Debian testing.
> listening on ipv4 and ipv6.
>
> On 6/3/17 8:02 AM, Josip wrote:
>> 3.6.2017. u 6:05, John je napisao/la:
>>> I run my own servers. I have been trying to connect Gramps 5 to the
>>> existing postgresql server.
>>>
>>> However, when I try to setup Gramps 5 on windows 7 with postgresql it
>>> fails as psycopg is missing.
>>>
>>> Anybody know how to add/install the missing bits.
>>>
>>
>> Which gramps and postgresql version?
>> You need https://pypi.python.org/pypi/psycopg2/2.7.1
>>

You must use psycopg2 with python included in AIO build but for that you
must have build it from source.

I build one if you are willing to try it.
Download "gramps_pq_dbapi.zip" from
https://sourceforge.net/projects/gramps/files/Dependencies/
and extract and copy files as follows
libpq.dll -> GrampsAIO64
_psycopg-cpython-35m.dll -> GrampsAIO64\lib
psycopg2 -> GrampsAIO64\lib\python35.zip

Notice that you have to add psycopg2 folder to zip file, in Windows-10
that can be done from file explorer.

It is built against postgresql-9.5.2 but i don't know if it will work
for other version (i guess it should for same major version)
If you test it and if it works i my include it in new
GrampsAIO-5.0.0-alpha2 build which will be released soon.

--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

John Allen
Thanks I give it a try asap.


On June 4, 2017 07:34:58 Josip <[hidden email]> wrote:

> 4.6.2017. u 5:13, John je napisao/la:
>> GrampsAIO64-5.0.0-alpha1-517-g882c37a running under Windows 7.
>> I have installed python 3.6 No IDE.
>> Ran pip install psycopg2 - this says it succeeded, but I cannot ind
>> psyscopg2. says its 2.7.1
>>
>> Postgresql 9.6.3-3 running under Debian testing.
>> listening on ipv4 and ipv6.
>>
>> On 6/3/17 8:02 AM, Josip wrote:
>>> 3.6.2017. u 6:05, John je napisao/la:
>>>> I run my own servers. I have been trying to connect Gramps 5 to the
>>>> existing postgresql server.
>>>>
>>>> However, when I try to setup Gramps 5 on windows 7 with postgresql it
>>>> fails as psycopg is missing.
>>>>
>>>> Anybody know how to add/install the missing bits.
>>>>
>>>
>>> Which gramps and postgresql version?
>>> You need https://pypi.python.org/pypi/psycopg2/2.7.1
>>>
>
> You must use psycopg2 with python included in AIO build but for that you
> must have build it from source.
>
> I build one if you are willing to try it.
> Download "gramps_pq_dbapi.zip" from
> https://sourceforge.net/projects/gramps/files/Dependencies/
> and extract and copy files as follows
> libpq.dll -> GrampsAIO64
> _psycopg-cpython-35m.dll -> GrampsAIO64\lib
> psycopg2 -> GrampsAIO64\lib\python35.zip
>
> Notice that you have to add psycopg2 folder to zip file, in Windows-10
> that can be done from file explorer.
>
> It is built against postgresql-9.5.2 but i don't know if it will work
> for other version (i guess it should for same major version)
> If you test it and if it works i my include it in new
> GrampsAIO-5.0.0-alpha2 build which will be released soon.
>
> --
> Josip
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

John Allen
I get the following error

42445: ERROR: grampsapp.py: line 143: Unhandled exception
Traceback (most recent call last):
   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
line 764, in __convert_db_ask
     lambda: self.__convert_db(name, dirname), parent=self.top)
   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dialog.py",
line 110, in __init__
     task()
   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
line 764, in <lambda>
     lambda: self.__convert_db(name, dirname), parent=self.top)
   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
line 803, in __convert_db
     dbase.load(new_path)
   File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
     self.initialize_backend(directory)
   File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
initialize_backend
     if not self.dbapi.table_exists("person"):
   File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
113, in table_exists
     "WHERE table_name=?;", [table])
psycopg2.ProgrammingError: operator does not exist:
information_schema.sql_identifier =?
LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
                                                                     ^
HINT:  No operator matches the given name and argument type(s). You
might need to add explicit type casts.

Gramps seems to make the connection and then things fall apart.



On 6/4/17 6:38 PM, John wrote:

> Thanks I give it a try asap.
>
>
> On June 4, 2017 07:34:58 Josip <[hidden email]> wrote:
>
>> 4.6.2017. u 5:13, John je napisao/la:
>>> GrampsAIO64-5.0.0-alpha1-517-g882c37a running under Windows 7.
>>> I have installed python 3.6 No IDE.
>>> Ran pip install psycopg2 - this says it succeeded, but I cannot ind
>>> psyscopg2. says its 2.7.1
>>>
>>> Postgresql 9.6.3-3 running under Debian testing.
>>> listening on ipv4 and ipv6.
>>>
>>> On 6/3/17 8:02 AM, Josip wrote:
>>>> 3.6.2017. u 6:05, John je napisao/la:
>>>>> I run my own servers. I have been trying to connect Gramps 5 to the
>>>>> existing postgresql server.
>>>>>
>>>>> However, when I try to setup Gramps 5 on windows 7 with postgresql it
>>>>> fails as psycopg is missing.
>>>>>
>>>>> Anybody know how to add/install the missing bits.
>>>>>
>>>>
>>>> Which gramps and postgresql version?
>>>> You need https://pypi.python.org/pypi/psycopg2/2.7.1
>>>>
>>
>> You must use psycopg2 with python included in AIO build but for that you
>> must have build it from source.
>>
>> I build one if you are willing to try it.
>> Download "gramps_pq_dbapi.zip" from
>> https://sourceforge.net/projects/gramps/files/Dependencies/
>> and extract and copy files as follows
>> libpq.dll -> GrampsAIO64
>> _psycopg-cpython-35m.dll -> GrampsAIO64\lib
>> psycopg2 -> GrampsAIO64\lib\python35.zip
>>
>> Notice that you have to add psycopg2 folder to zip file, in Windows-10
>> that can be done from file explorer.
>>
>> It is built against postgresql-9.5.2 but i don't know if it will work
>> for other version (i guess it should for same major version)
>> If you test it and if it works i my include it in new
>> GrampsAIO-5.0.0-alpha2 build which will be released soon.
>>
>> --
>> Josip
>>
>> ------------------------------------------------------------------------------
>>
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gramps-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gramps-users
>> https://gramps-project.org
>
>
>
> ------------------------------------------------------------------------------
>
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

John Allen
In reply to this post by John Allen
is there a script  or something to create the blank/empty DB into which
the conversion put the existing data.


On 6/4/17 6:38 PM, John wrote:

> Thanks I give it a try asap.
>
>
> On June 4, 2017 07:34:58 Josip <[hidden email]> wrote:
>
>> 4.6.2017. u 5:13, John je napisao/la:
>>> GrampsAIO64-5.0.0-alpha1-517-g882c37a running under Windows 7.
>>> I have installed python 3.6 No IDE.
>>> Ran pip install psycopg2 - this says it succeeded, but I cannot ind
>>> psyscopg2. says its 2.7.1
>>>
>>> Postgresql 9.6.3-3 running under Debian testing.
>>> listening on ipv4 and ipv6.
>>>
>>> On 6/3/17 8:02 AM, Josip wrote:
>>>> 3.6.2017. u 6:05, John je napisao/la:
>>>>> I run my own servers. I have been trying to connect Gramps 5 to the
>>>>> existing postgresql server.
>>>>>
>>>>> However, when I try to setup Gramps 5 on windows 7 with postgresql it
>>>>> fails as psycopg is missing.
>>>>>
>>>>> Anybody know how to add/install the missing bits.
>>>>>
>>>>
>>>> Which gramps and postgresql version?
>>>> You need https://pypi.python.org/pypi/psycopg2/2.7.1
>>>>
>>
>> You must use psycopg2 with python included in AIO build but for that you
>> must have build it from source.
>>
>> I build one if you are willing to try it.
>> Download "gramps_pq_dbapi.zip" from
>> https://sourceforge.net/projects/gramps/files/Dependencies/
>> and extract and copy files as follows
>> libpq.dll -> GrampsAIO64
>> _psycopg-cpython-35m.dll -> GrampsAIO64\lib
>> psycopg2 -> GrampsAIO64\lib\python35.zip
>>
>> Notice that you have to add psycopg2 folder to zip file, in Windows-10
>> that can be done from file explorer.
>>
>> It is built against postgresql-9.5.2 but i don't know if it will work
>> for other version (i guess it should for same major version)
>> If you test it and if it works i my include it in new
>> GrampsAIO-5.0.0-alpha2 build which will be released soon.
>>
>> --
>> Josip
>>
>> ------------------------------------------------------------------------------
>>
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gramps-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gramps-users
>> https://gramps-project.org
>
>
>
> ------------------------------------------------------------------------------
>
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

Josip
In reply to this post by John Allen
Open your existing family tree an export/backup it as xml. Create new database (DBAPI), open it and import xml into it.


Josip


-------- Original message --------
From: John <[hidden email]>
Date:
To: [hidden email]
Subject: Re: [Gramps-users] gramps 5 + postgresql


is there a script  or something to create the blank/empty DB into which
the conversion put the existing data.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

Josip
In reply to this post by John Allen
5.6.2017. u 6:48, John je napisao/la:

>
> 42445: ERROR: grampsapp.py: line 143: Unhandled exception
> Traceback (most recent call last):
>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
> line 764, in __convert_db_ask
>     lambda: self.__convert_db(name, dirname), parent=self.top)
>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dialog.py",
> line 110, in __init__
>     task()
>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
> line 764, in <lambda>
>     lambda: self.__convert_db(name, dirname), parent=self.top)
>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
> line 803, in __convert_db
>     dbase.load(new_path)
>   File "C:\Program Files
> (x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
>     self.initialize_backend(directory)
>   File "C:\Program Files
> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
> initialize_backend
>     if not self.dbapi.table_exists("person"):
>   File "C:\Program Files
> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
> 113, in table_exists
>     "WHERE table_name=?;", [table])
> psycopg2.ProgrammingError: operator does not exist:
> information_schema.sql_identifier =?
> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>                                                                     ^
> HINT:  No operator matches the given name and argument type(s). You
> might need to add explicit type casts.
>

Now when i look at that source code i see that it needs few changes.

Open mentioned file "postgresql.py" and at line 114 change it from:
   self.__cursor.execute("SELECT COUNT(*) "
to:
   self.execute("SELECT COUNT(*) "
also add bellow line 63 add this:
   query = query.replace("BLOB", "bytea")

With this changes converting database works for me.
I will report it on bug-tracker, you can report any other bug you find
there too.

--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

GRAMPS - User mailing list
Do we need to move this stuff out of the mailing list, if so where?

Tried to open the data, via "load family data" similar results -

113105: ERROR: dbloader.py: line 108: operator does not exist:
information_schema.sql_identifier =?
LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
                                                                     ^
HINT:  No operator matches the given name and argument type(s). You
might need to add explicit type casts.

Traceback (most recent call last):
   File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\gui\dbloader.py", line 337, in read_file
     force_python_upgrade)
   File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
     self.initialize_backend(directory)
   File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
initialize_backend
     if not self.dbapi.table_exists("person"):
   File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
113, in table_exists
     "WHERE table_name=?;", [table])
psycopg2.ProgrammingError: operator does not exist:
information_schema.sql_identifier =?
LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
                                                                     ^
HINT:  No operator matches the given name and argument type(s). You
might need to add explicit type casts.


On 6/5/17 3:13 PM, Josip wrote:

> 5.6.2017. u 6:48, John je napisao/la:
>>
>> 42445: ERROR: grampsapp.py: line 143: Unhandled exception
>> Traceback (most recent call last):
>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>> line 764, in __convert_db_ask
>>     lambda: self.__convert_db(name, dirname), parent=self.top)
>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dialog.py",
>> line 110, in __init__
>>     task()
>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>> line 764, in <lambda>
>>     lambda: self.__convert_db(name, dirname), parent=self.top)
>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>> line 803, in __convert_db
>>     dbase.load(new_path)
>>   File "C:\Program Files
>> (x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
>>     self.initialize_backend(directory)
>>   File "C:\Program Files
>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
>> initialize_backend
>>     if not self.dbapi.table_exists("person"):
>>   File "C:\Program Files
>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
>> 113, in table_exists
>>     "WHERE table_name=?;", [table])
>> psycopg2.ProgrammingError: operator does not exist:
>> information_schema.sql_identifier =?
>> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>>                                                                     ^
>> HINT:  No operator matches the given name and argument type(s). You
>> might need to add explicit type casts.
>>
>
> Now when i look at that source code i see that it needs few changes.
>
> Open mentioned file "postgresql.py" and at line 114 change it from:
>   self.__cursor.execute("SELECT COUNT(*) "
> to:
>   self.execute("SELECT COUNT(*) "
> also add bellow line 63 add this:
>   query = query.replace("BLOB", "bytea")
>
> With this changes converting database works for me.
> I will report it on bug-tracker, you can report any other bug you find
> there too.
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

Josip
6.6.2017. u 0:15, John via Gramps-users je napisao/la:

> Do we need to move this stuff out of the mailing list, if so where?
>
> Tried to open the data, via "load family data" similar results -
>
> 113105: ERROR: dbloader.py: line 108: operator does not exist:
> information_schema.sql_identifier =?
> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>                                                                     ^
> HINT:  No operator matches the given name and argument type(s). You
> might need to add explicit type casts.
>
> Traceback (most recent call last):
>   File "C:\Program Files
> (x86)\GrampsAIO64-5.0.0\gramps\gui\dbloader.py", line 337, in read_file
>     force_python_upgrade)
>   File "C:\Program Files
> (x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
>     self.initialize_backend(directory)
>   File "C:\Program Files
> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
> initialize_backend
>     if not self.dbapi.table_exists("person"):
>   File "C:\Program Files
> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
> 113, in table_exists
>     "WHERE table_name=?;", [table])
> psycopg2.ProgrammingError: operator does not exist:
> information_schema.sql_identifier =?
> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>                                                                     ^
> HINT:  No operator matches the given name and argument type(s). You
> might need to add explicit type casts.
>
>
> On 6/5/17 3:13 PM, Josip wrote:
>> 5.6.2017. u 6:48, John je napisao/la:
>>>
>>> 42445: ERROR: grampsapp.py: line 143: Unhandled exception
>>> Traceback (most recent call last):
>>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>> line 764, in __convert_db_ask
>>>     lambda: self.__convert_db(name, dirname), parent=self.top)
>>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dialog.py",
>>> line 110, in __init__
>>>     task()
>>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>> line 764, in <lambda>
>>>     lambda: self.__convert_db(name, dirname), parent=self.top)
>>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>> line 803, in __convert_db
>>>     dbase.load(new_path)
>>>   File "C:\Program Files
>>> (x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
>>>     self.initialize_backend(directory)
>>>   File "C:\Program Files
>>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
>>> initialize_backend
>>>     if not self.dbapi.table_exists("person"):
>>>   File "C:\Program Files
>>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
>>> 113, in table_exists
>>>     "WHERE table_name=?;", [table])
>>> psycopg2.ProgrammingError: operator does not exist:
>>> information_schema.sql_identifier =?
>>> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>>>                                                                     ^
>>> HINT:  No operator matches the given name and argument type(s). You
>>> might need to add explicit type casts.
>>>
>>
>> Now when i look at that source code i see that it needs few changes.
>>
>> Open mentioned file "postgresql.py" and at line 114 change it from:
>>   self.__cursor.execute("SELECT COUNT(*) "
>> to:
>>   self.execute("SELECT COUNT(*) "
>> also add bellow line 63 add this:
>>   query = query.replace("BLOB", "bytea")
>>
>> With this changes converting database works for me.
>> I will report it on bug-tracker, you can report any other bug you find
>> there too.
>>
>

Did you make two changes mention above?
I report it on:
https://gramps-project.org/bugs/view.php?id=10071


--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

GRAMPS - User mailing list
yes, it didn't work but it pointed me in the right direction.

I changed thr table_exists -

self.__cursor.execute("select count(*) "
                                       "from information_schema,tables "
                                      "where table_name=%s", [name])

plus added your line to the _hack_query

seems to be working OK.  now


On 6/5/17 6:57 PM, Josip wrote:

> 6.6.2017. u 0:15, John via Gramps-users je napisao/la:
>> Do we need to move this stuff out of the mailing list, if so where?
>>
>> Tried to open the data, via "load family data" similar results -
>>
>> 113105: ERROR: dbloader.py: line 108: operator does not exist:
>> information_schema.sql_identifier =?
>> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>>                                                                     ^
>> HINT:  No operator matches the given name and argument type(s). You
>> might need to add explicit type casts.
>>
>> Traceback (most recent call last):
>>   File "C:\Program Files
>> (x86)\GrampsAIO64-5.0.0\gramps\gui\dbloader.py", line 337, in read_file
>>     force_python_upgrade)
>>   File "C:\Program Files
>> (x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
>>     self.initialize_backend(directory)
>>   File "C:\Program Files
>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
>> initialize_backend
>>     if not self.dbapi.table_exists("person"):
>>   File "C:\Program Files
>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
>> 113, in table_exists
>>     "WHERE table_name=?;", [table])
>> psycopg2.ProgrammingError: operator does not exist:
>> information_schema.sql_identifier =?
>> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>>                                                                     ^
>> HINT:  No operator matches the given name and argument type(s). You
>> might need to add explicit type casts.
>>
>>
>> On 6/5/17 3:13 PM, Josip wrote:
>>> 5.6.2017. u 6:48, John je napisao/la:
>>>>
>>>> 42445: ERROR: grampsapp.py: line 143: Unhandled exception
>>>> Traceback (most recent call last):
>>>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>>> line 764, in __convert_db_ask
>>>>     lambda: self.__convert_db(name, dirname), parent=self.top)
>>>>   File "C:\Program Files
>>>> (x86)\GrampsAIO64-5.0.0\gramps\gui\dialog.py",
>>>> line 110, in __init__
>>>>     task()
>>>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>>> line 764, in <lambda>
>>>>     lambda: self.__convert_db(name, dirname), parent=self.top)
>>>>   File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>>> line 803, in __convert_db
>>>>     dbase.load(new_path)
>>>>   File "C:\Program Files
>>>> (x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
>>>>     self.initialize_backend(directory)
>>>>   File "C:\Program Files
>>>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line
>>>> 173, in
>>>> initialize_backend
>>>>     if not self.dbapi.table_exists("person"):
>>>>   File "C:\Program Files
>>>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
>>>> 113, in table_exists
>>>>     "WHERE table_name=?;", [table])
>>>> psycopg2.ProgrammingError: operator does not exist:
>>>> information_schema.sql_identifier =?
>>>> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE
>>>> table_name=?;
>>>>                                                                     ^
>>>> HINT:  No operator matches the given name and argument type(s). You
>>>> might need to add explicit type casts.
>>>>
>>>
>>> Now when i look at that source code i see that it needs few changes.
>>>
>>> Open mentioned file "postgresql.py" and at line 114 change it from:
>>>   self.__cursor.execute("SELECT COUNT(*) "
>>> to:
>>>   self.execute("SELECT COUNT(*) "
>>> also add bellow line 63 add this:
>>>   query = query.replace("BLOB", "bytea")
>>>
>>> With this changes converting database works for me.
>>> I will report it on bug-tracker, you can report any other bug you find
>>> there too.
>>>
>>
>
> Did you make two changes mention above?
> I report it on:
> https://gramps-project.org/bugs/view.php?id=10071
>
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

GRAMPS - User mailing list
With the fixes we worked out I now have it up and running. The gramps DB
is on my debian stretch server and I seem to be able to access it from
all my systems. It will need some more testing to ensure it is safe to
use, but so far so good.

John  A


On 05/06/17 10:34 PM, John via Gramps-users wrote:

> yes, it didn't work but it pointed me in the right direction.
>
> I changed thr table_exists -
>
> self.__cursor.execute("select count(*) "
>                                       "from information_schema,tables "
>                                      "where table_name=%s", [name])
>
> plus added your line to the _hack_query
>
> seems to be working OK.  now
>
>
> On 6/5/17 6:57 PM, Josip wrote:
>> 6.6.2017. u 0:15, John via Gramps-users je napisao/la:
>>> Do we need to move this stuff out of the mailing list, if so where?
>>>
>>> Tried to open the data, via "load family data" similar results -
>>>
>>> 113105: ERROR: dbloader.py: line 108: operator does not exist:
>>> information_schema.sql_identifier =?
>>> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>>>                                                                     ^
>>> HINT:  No operator matches the given name and argument type(s). You
>>> might need to add explicit type casts.
>>>
>>> Traceback (most recent call last):
>>>   File "C:\Program Files
>>> (x86)\GrampsAIO64-5.0.0\gramps\gui\dbloader.py", line 337, in read_file
>>>     force_python_upgrade)
>>>   File "C:\Program Files
>>> (x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
>>>     self.initialize_backend(directory)
>>>   File "C:\Program Files
>>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
>>> initialize_backend
>>>     if not self.dbapi.table_exists("person"):
>>>   File "C:\Program Files
>>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
>>> 113, in table_exists
>>>     "WHERE table_name=?;", [table])
>>> psycopg2.ProgrammingError: operator does not exist:
>>> information_schema.sql_identifier =?
>>> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
>>>                                                                     ^
>>> HINT:  No operator matches the given name and argument type(s). You
>>> might need to add explicit type casts.
>>>
>>>
>>> On 6/5/17 3:13 PM, Josip wrote:
>>>> 5.6.2017. u 6:48, John je napisao/la:
>>>>>
>>>>> 42445: ERROR: grampsapp.py: line 143: Unhandled exception
>>>>> Traceback (most recent call last):
>>>>>   File "C:\Program Files
>>>>> (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>>>> line 764, in __convert_db_ask
>>>>>     lambda: self.__convert_db(name, dirname), parent=self.top)
>>>>>   File "C:\Program Files
>>>>> (x86)\GrampsAIO64-5.0.0\gramps\gui\dialog.py",
>>>>> line 110, in __init__
>>>>>     task()
>>>>>   File "C:\Program Files
>>>>> (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>>>> line 764, in <lambda>
>>>>>     lambda: self.__convert_db(name, dirname), parent=self.top)
>>>>>   File "C:\Program Files
>>>>> (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
>>>>> line 803, in __convert_db
>>>>>     dbase.load(new_path)
>>>>>   File "C:\Program Files
>>>>> (x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
>>>>>     self.initialize_backend(directory)
>>>>>   File "C:\Program Files
>>>>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line
>>>>> 173, in
>>>>> initialize_backend
>>>>>     if not self.dbapi.table_exists("person"):
>>>>>   File "C:\Program Files
>>>>> (x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
>>>>> 113, in table_exists
>>>>>     "WHERE table_name=?;", [table])
>>>>> psycopg2.ProgrammingError: operator does not exist:
>>>>> information_schema.sql_identifier =?
>>>>> LINE 1: ... COUNT(*) FROM information_schema.tables WHERE
>>>>> table_name=?;
>>>>>                                                                     ^
>>>>> HINT:  No operator matches the given name and argument type(s). You
>>>>> might need to add explicit type casts.
>>>>>
>>>>
>>>> Now when i look at that source code i see that it needs few changes.
>>>>
>>>> Open mentioned file "postgresql.py" and at line 114 change it from:
>>>>   self.__cursor.execute("SELECT COUNT(*) "
>>>> to:
>>>>   self.execute("SELECT COUNT(*) "
>>>> also add bellow line 63 add this:
>>>>   query = query.replace("BLOB", "bytea")
>>>>
>>>> With this changes converting database works for me.
>>>> I will report it on bug-tracker, you can report any other bug you find
>>>> there too.
>>>>
>>>
>>
>> Did you make two changes mention above?
>> I report it on:
>> https://gramps-project.org/bugs/view.php?id=10071
>>
>>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>
> ------------------------------------------------------------------------------
>
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: gramps 5 + postgresql

GRAMPS - User mailing list

06:20

Text only, the original BSDDB only contains text, everything else is in the ...gpkg.media directory.

Until such time as the database is redesigned to include everything media files will not be added tot he DB.

I am think of using something like WebDAV to provide shared storage for media files i the interim. However I need to do some digging to see if webDAV is the "best" solution or even if its a solution at all.

The problem is that different opsys handle storage location differently, M$ uses drive letters, linux uses mount points, and I don't know how apple handles these things.

How do we handle something like "C:/Users/john/The Family (A)_2017-05-05.gpkg.media/Documents and Settings/John/Desktop/Genealogy/Barnett/Abert-paterick-death-cert-large.JPG" in linux.


08:00

I am not sure but I don't think the postgresql DB version of this is viable. I keep coming across error such as relationships not defined or unknown.

I think that if we want to switch to another DB we need to think seriously about the its design.

08:30

I am switching back to the BSDDB version as I am finding an awful lot wrong with the postgresql DB.



On 06/06/17 03:40 AM, Hugh Paterson III wrote:
@John,

Do you have image based resources as sources in this set up or is this only textual information?

- Hugh

On Mon, Jun 5, 2017 at 8:59 PM, john via Gramps-users <[hidden email]> wrote:
With the fixes we worked out I now have it up and running. The gramps DB is on my debian stretch server and I seem to be able to access it from all my systems. It will need some more testing to ensure it is safe to use, but so far so good.

John  A



On 05/06/17 10:34 PM, John via Gramps-users wrote:
yes, it didn't work but it pointed me in the right direction.

I changed thr table_exists -

self.__cursor.execute("select count(*) "
                                      "from information_schema,tables "
                                     "where table_name=%s", [name])

plus added your line to the _hack_query

seems to be working OK.  now


On 6/5/17 6:57 PM, Josip wrote:
6.6.2017. u 0:15, John via Gramps-users je napisao/la:
Do we need to move this stuff out of the mailing list, if so where?

Tried to open the data, via "load family data" similar results -

113105: ERROR: dbloader.py: line 108: operator does not exist:
information_schema.sql_identifier =?
LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
                                                                    ^
HINT:  No operator matches the given name and argument type(s). You
might need to add explicit type casts.

Traceback (most recent call last):
  File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\gui\dbloader.py", line 337, in read_file
    force_python_upgrade)
  File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
    self.initialize_backend(directory)
  File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
initialize_backend
    if not self.dbapi.table_exists("person"):
  File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
113, in table_exists
    "WHERE table_name=?;", [table])
psycopg2.ProgrammingError: operator does not exist:
information_schema.sql_identifier =?
LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
                                                                    ^
HINT:  No operator matches the given name and argument type(s). You
might need to add explicit type casts.


On 6/5/17 3:13 PM, Josip wrote:
5.6.2017. u 6:48, John je napisao/la:

42445: ERROR: grampsapp.py: line 143: Unhandled exception
Traceback (most recent call last):
  File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
line 764, in __convert_db_ask
    lambda: self.__convert_db(name, dirname), parent=self.top)
  File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dialog.py",
line 110, in __init__
    task()
  File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
line 764, in <lambda>
    lambda: self.__convert_db(name, dirname), parent=self.top)
  File "C:\Program Files (x86)\GrampsAIO64-5.0.0\gramps\gui\dbman.py",
line 803, in __convert_db
    dbase.load(new_path)
  File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\gen\db\generic.py", line 710, in load
    self.initialize_backend(directory)
  File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\dbapi.py", line 173, in
initialize_backend
    if not self.dbapi.table_exists("person"):
  File "C:\Program Files
(x86)\GrampsAIO64-5.0.0\gramps\plugins\db\dbapi\postgresql.py", line
113, in table_exists
    "WHERE table_name=?;", [table])
psycopg2.ProgrammingError: operator does not exist:
information_schema.sql_identifier =?
LINE 1: ... COUNT(*) FROM information_schema.tables WHERE table_name=?;
                                                                    ^
HINT:  No operator matches the given name and argument type(s). You
might need to add explicit type casts.


Now when i look at that source code i see that it needs few changes.

Open mentioned file "postgresql.py" and at line 114 change it from:
  self.__cursor.execute("SELECT COUNT(*) "
to:
  self.execute("SELECT COUNT(*) "
also add bellow line 63 add this:
  query = query.replace("BLOB", "bytea")

With this changes converting database works for me.
I will report it on bug-tracker, you can report any other bug you find
there too.



Did you make two changes mention above?
I report it on:
https://gramps-project.org/bugs/view.php?id=10071




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org