What has the Berkeley Database got to do with Gramps?

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

What has the Berkeley Database got to do with Gramps?

Keith Jacobs

Hello All

I have previously reported this problem as a BUG but have not received a solution so I am hoping that by opening it up to a wider audience that I might  find someone with a solution.

I am using Gramps on Linux Mint 19 Tara with the following configuration
System Information:
===================

Gramps version: 5.0.1
Python version: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
BSDDB version: 6.1.0 (5, 3, 28)
sqlite version: 3.22.0 (2.6.0)
LANG: en_GB.UTF-8
OS: Linux
Distribution: 4.15.0-48-generic

GTK version    : 3.22.30
gobject version: 3.26.1
cairo version  : (1, 16, 2)

And trying to locate my Gramps data on the same drive as I use for all my data,. I have no problems accessing the data on this drive  with any other application that I use.

However with Gramps data path set to this particular drive I get an error message reporting an error in the underlying Berkeley database, regardless of whether Gramps is set for using the BSDDB or SQLite database format.

Ok, hopefully I still have your attention. This drive is attached to the USB port of my Router and if I use a local Drive/Folder, for the Gramps data, Gramps works perfectly.

When creating a new Gramps database, using this drive, the required files and folders are created but because all files, regardless of the application associated with files on this drive, report that the file permissions cannot be determined.Gramps will fail straight after creating these files and folders; I guess because it cannot open the files because it cannot determine the file preferences. Incidently using Windows 10 these file preferences can be determined.

But why is Gramps the only application that fails to open files on this drive and what has it to do with the Berekeley database?

--
Regards
Keith Jacobs


--
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: What has the Berkeley Database got to do with Gramps?

J. Allen Crider-2
The B in BSDDB stands for Berkeley.  I get the same error whenever I try
to use sqlite, and no one has been able to help me with that so I've
given up on trying to convert to sqlite from BSDDB.

I would look at how you are mounting the drive on your system.  Here is
the fstab line that I use to mount a USB drive on my router:

//172.16.0.1/USB_Storage /home/readyshare cifs
sec=ntlm,nolinux,guest,uid=1000,gid=1000,iocharset=utf8,file_mode=0777,dir_mode=0777,vers=
1.0 0 0

I don't remember what all of the parameters do right now, but it took
some effort to find the right combination when I first set it up.

Allen Crider

On 6/22/19 7:09 AM, Keith Jacobs wrote:

> Hello All
>
> I have previously reported this problem as a BUG but have not received a
> solution so I am hoping that by opening it up to a wider audience that I
> might  find someone with a solution.
>
> I am using Gramps on Linux Mint 19 Tara with the following configuration
> System Information:
> ===================
>
> Gramps version: 5.0.1
> Python version: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
> BSDDB version: 6.1.0 (5, 3, 28)
> sqlite version: 3.22.0 (2.6.0)
> LANG: en_GB.UTF-8
> OS: Linux
> Distribution: 4.15.0-48-generic
>
> GTK version    : 3.22.30
> gobject version: 3.26.1
> cairo version  : (1, 16, 2)
>
> And trying to locate my Gramps data on the same drive as I use for all
> my data,. I have no problems accessing the data on this drive  with any
> other application that I use.
>
> However with Gramps data path set to this particular drive I get an
> error message reporting an error in the underlying Berkeley database,
> regardless of whether Gramps is set for using the BSDDB or SQLite
> database format.
>
> Ok, hopefully I still have your attention. This drive is attached to the
> USB port of my Router and if I use a local Drive/Folder, for the Gramps
> data, Gramps works perfectly.
>
> When creating a new Gramps database, using this drive, the required
> files and folders are created but because all files, regardless of the
> application associated with files on this drive, report that the file
> permissions cannot be determined.Gramps will fail straight after
> creating these files and folders; I guess because it cannot open the
> files because it cannot determine the file preferences. Incidently using
> Windows 10 these file preferences can be determined.
>
> But why is Gramps the only application that fails to open files on this
> drive and what has it to do with the Berekeley database?
>
> --
> Regards
> Keith Jacobs
>
>
>


--
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: What has the Berkeley Database got to do with Gramps?

Nick Hall
In reply to this post by Keith Jacobs
On 22/06/2019 13:09, Keith Jacobs wrote:

However with Gramps data path set to this particular drive I get an error message reporting an error in the underlying Berkeley database, regardless of whether Gramps is set for using the BSDDB or SQLite database format.

What is the exact error message you are getting?

Do any of your family trees use the BSDDB database backend?

Nick.




--
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: What has the Berkeley Database got to do with Gramps?

Keith Jacobs

Hi Nick

I have been experimenting with a totally new installation of Gramps on my laptop and have used only a test database both with BSDDB and SQLite but only one at a time and with different folders, thereby keeping them as seperate as possible.

Here is the full Bug report.

Error Details:
===================

16495: ERROR: dbloader.py: line 107: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB4520 txn_checkpoint: log failed at LSN [1 28]: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery')
38390: ERROR: dbloader.py: line 107: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB4520 txn_checkpoint: log failed at LSN [1 28]: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery')

System Information:
===================

Gramps version: 5.0.1
Python version: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
BSDDB version: 6.1.0 (5, 3, 28)
sqlite version: 3.22.0 (2.6.0)
LANG: en_GB.UTF-8
OS: Linux
Distribution: 4.15.0-48-generic

GTK version    : 3.22.30
gobject version: 3.26.1
cairo version  : (1, 16, 2)

Regards
Keith Jacobs
On 22/06/2019 16:51, Nick Hall wrote:
On 22/06/2019 13:09, Keith Jacobs wrote:

However with Gramps data path set to this particular drive I get an error message reporting an error in the underlying Berkeley database, regardless of whether Gramps is set for using the BSDDB or SQLite database format.

What is the exact error message you are getting?

Do any of your family trees use the BSDDB database backend?

Nick.






--
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: What has the Berkeley Database got to do with Gramps?

Nick Hall
On 22/06/2019 17:05, Keith Jacobs wrote:

Hi Nick

I have been experimenting with a totally new installation of Gramps on my laptop and have used only a test database both with BSDDB and SQLite but only one at a time and with different folders, thereby keeping them as seperate as possible.

Here is the full Bug report.

Error Details:
===================

16495: ERROR: dbloader.py: line 107: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB4520 txn_checkpoint: log failed at LSN [1 28]: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery')
38390: ERROR: dbloader.py: line 107: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB4520 txn_checkpoint: log failed at LSN [1 28]: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery')

This error indicates a corrupt BSDDB database.

Did you simply create a new database and then import a backup?

I assume that you don't get this error if you use the SQLite backend.


Nick.




--
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: What has the Berkeley Database got to do with Gramps?

Keith Jacobs
In reply to this post by Keith Jacobs
Hi Nick

I have created new databases each time and get the error immediately without importing or adding any data.

Gramps thinks the database is corrupt because it cannot get the files properties.

That's the worst part of it I also get this error with SQLite.
Regards
Keith
On 22/06/2019, 17:25 Nick Hall <[hidden email]> wrote:
On 22/06/2019 17:05, Keith Jacobs wrote:

Hi Nick

I have been experimenting with a totally new installation of Gramps on my laptop and have used only a test database both with BSDDB and SQLite but only one at a time and with different folders, thereby keeping them as seperate as possible.

Here is the full Bug report.

Error Details:
===================

16495: ERROR: dbloader.py: line 107: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB4520 txn_checkpoint: log failed at LSN [1 28]: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery')
38390: ERROR: dbloader.py: line 107: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB4520 txn_checkpoint: log failed at LSN [1 28]: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery')

This error indicates a corrupt BSDDB database.

Did you simply create a new database and then import a backup?

I assume that you don't get this error if you use the SQLite backend.


Nick.


-- Gramps-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gramps-users https://gramps-project.org


--
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: What has the Berkeley Database got to do with Gramps?

Nick Hall
On 22/06/2019 17:33, Keith Jacobs wrote:
>
> I have created new databases each time and get the error immediately
> without importing or adding any data.
>
> Gramps thinks the database is corrupt because it cannot get the files
> properties.
>
> That's the worst part of it I also get this error with SQLite.

When Gramps opens a family tree it tries to read a file called
database.txt which contains the database backend type.  If the file is
missing it assumes that the backend is BSDDB.

The code actually uses the python "os.path.isfile(path)" to check if the
path is a file.  This is obviously returning False for some reason.  So
it is more than the file permissions cannot be detected.  Gramps does
not recognise the path as a file.

You could try some basic file read/write tests from a python command
line to investigate the problem further.


Nick.




--
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: What has the Berkeley Database got to do with Gramps?

Keith Jacobs
In reply to this post by Keith Jacobs
Hi Nick

I have checked the contents of the files that were created, against those created for the same database name on the local disc and all files have been created correctly.

Can you provide some guidance for testing?
Regards
Keith
On 22/06/2019, 18:03 Nick Hall <[hidden email]> wrote:
On 22/06/2019 17:33, Keith Jacobs wrote:
>
> I have created new databases each time and get the error immediately
> without importing or adding any data.
>
> Gramps thinks the database is corrupt because it cannot get the files
> properties.
>
> That's the worst part of it I also get this error with SQLite.

When Gramps opens a family tree it tries to read a file called
database.txt which contains the database backend type.  If the file is
missing it assumes that the backend is BSDDB.

The code actually uses the python "os.path.isfile(path)" to check if the
path is a file.  This is obviously returning False for some reason.  So
it is more than the file permissions cannot be detected.  Gramps does
not recognise the path as a file.

You could try some basic file read/write tests from a python command
line to investigate the problem further.


Nick.




--
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: What has the Berkeley Database got to do with Gramps?

Nick Hall
On 22/06/2019 18:18, Keith Jacobs wrote:
> Can you provide some guidance for testing?

Create a file with:

 > with open("test.txt", "w") as f:
 >     f.write("test")

Read it with:

 > with open("test.txt", "r") as f:
 >     print (f.readline())

Run some tests with:

 > import os

 > os.stat("test.txt")

 > os.path.exists("test.txt")

 > os.path.isfile("test.txt")

This will check that we can read and write files from python.


Nick.




--
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: What has the Berkeley Database got to do with Gramps?

Keith Jacobs
In reply to this post by Keith Jacobs
Nick

I will try that tomorrow.
Regards
Keith
On 22/06/2019, 19:14 Nick Hall <[hidden email]> wrote:
On 22/06/2019 18:18, Keith Jacobs wrote:
> Can you provide some guidance for testing?

Create a file with:

> with open("test.txt", "w") as f:
>     f.write("test")

Read it with:

> with open("test.txt", "r") as f:
>     print (f.readline())

Run some tests with:

> import os

> os.stat("test.txt")

> os.path.exists("test.txt")

> os.path.isfile("test.txt")

This will check that we can read and write files from python.


Nick.




--
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: What has the Berkeley Database got to do with Gramps?

J. Allen Crider-2
In reply to this post by Nick Hall
This was the hint that has put me on the track to solving my problem
with sqlite.  I created a new sqlite database without opening it, and
then looked at the files created.  There were only two files,
database.txt and name.txt.  Both files contained only a single line of
text without a newline at the end.  I edited both files to add a newline
and I am no longer getting the error that I have always seen in the
past.  Somebody needs to look at either the creation or reading of these
files to add the newline at file creation or handle reading the files
without a newline.

Now that I've gotten this far, I may give sqlite another try to see if
it solves the problem I frequently have when I leave Gramps open for too
long.

Allen Crider

On 6/22/19 12:03 PM, Nick Hall wrote:

> On 22/06/2019 17:33, Keith Jacobs wrote:
>>
>> I have created new databases each time and get the error immediately
>> without importing or adding any data.
>>
>> Gramps thinks the database is corrupt because it cannot get the files
>> properties.
>>
>> That's the worst part of it I also get this error with SQLite.
>
> When Gramps opens a family tree it tries to read a file called
> database.txt which contains the database backend type.  If the file is
> missing it assumes that the backend is BSDDB.
>
> The code actually uses the python "os.path.isfile(path)" to check if the
> path is a file.  This is obviously returning False for some reason.  So
> it is more than the file permissions cannot be detected.  Gramps does
> not recognise the path as a file.
>
> You could try some basic file read/write tests from a python command
> line to investigate the problem further.
>
>
> Nick.
>
>
>
>


--
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: What has the Berkeley Database got to do with Gramps?

Keith Jacobs
In reply to this post by Keith Jacobs
Allen

That's very interesting and I will certainly give that a go.
Regards
Keith
On 22/06/2019, 20:15 "J. Allen Crider" <[hidden email]> wrote:
This was the hint that has put me on the track to solving my problem
with sqlite. I created a new sqlite database without opening it, and
then looked at the files created. There were only two files,
database.txt and name.txt. Both files contained only a single line of
text without a newline at the end. I edited both files to add a newline
and I am no longer getting the error that I have always seen in the
past. Somebody needs to look at either the creation or reading of these
files to add the newline at file creation or handle reading the files
without a newline.

Now that I've gotten this far, I may give sqlite another try to see if
it solves the problem I frequently have when I leave Gramps open for too
long.

Allen Crider

On 6/22/19 12:03 PM, Nick Hall wrote:
> On 22/06/2019 17:33, Keith Jacobs wrote:
>>
>> I have created new databases each time and get the error immediately
>> without importing or adding any data.
>>
>> Gramps thinks the database is corrupt because it cannot get the files
>> properties.
>>
>> That's the worst part of it I also get this error with SQLite.
>
> When Gramps opens a family tree it tries to read a file called
> database.txt which contains the database backend type.  If the file is
> missing it assumes that the backend is BSDDB.
>
> The code actually uses the python "os.path.isfile(path)" to check if the
> path is a file.  This is obviously returning False for some reason.  So
> it is more than the file permissions cannot be detected.  Gramps does
> not recognise the path as a file.
>
> You could try some basic file read/write tests from a python command
> line to investigate the problem further.
>
>
> Nick.
>
>
>
>


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


--
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: What has the Berkeley Database got to do with Gramps?

Nick Hall
In reply to this post by J. Allen Crider-2
On 22/06/2019 20:15, J. Allen Crider wrote:
> This was the hint that has put me on the track to solving my problem
> with sqlite.  I created a new sqlite database without opening it, and
> then looked at the files created.  There were only two files,
> database.txt and name.txt.  Both files contained only a single line of
> text without a newline at the end.  I edited both files to add a
> newline and I am no longer getting the error that I have always seen
> in the past.  Somebody needs to look at either the creation or reading
> of these files to add the newline at file creation or handle reading
> the files without a newline.


These files should contain a string without a newline.  The file
database.txt contains the backend type ans name.txt contains the name of
the family tree.

How did you edit these files?  What file metadata was changed?


>
> Now that I've gotten this far, I may give sqlite another try to see if
> it solves the problem I frequently have when I leave Gramps open for
> too long.
>

Good idea.  We may stop supporting BSDDB at some point in the future. 
SQLite is the default backend for v5.1.


Nick.




--
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: What has the Berkeley Database got to do with Gramps?

J. Allen Crider-2


On 6/22/19 3:07 PM, Nick Hall wrote:

> On 22/06/2019 20:15, J. Allen Crider wrote:
>> This was the hint that has put me on the track to solving my problem
>> with sqlite.  I created a new sqlite database without opening it, and
>> then looked at the files created.  There were only two files,
>> database.txt and name.txt.  Both files contained only a single line of
>> text without a newline at the end.  I edited both files to add a
>> newline and I am no longer getting the error that I have always seen
>> in the past.  Somebody needs to look at either the creation or reading
>> of these files to add the newline at file creation or handle reading
>> the files without a newline.
>
>
> These files should contain a string without a newline.  The file
> database.txt contains the backend type ans name.txt contains the name of
> the family tree.
>
> How did you edit these files?  What file metadata was changed?

I used vi to edit the files.  The output of the file command changed
from "ASCII text, with no line terminators" to simply "ASCII text".  I
don't know that anything else changed.

Another oddity is that after successfully opening the empty database
with the newlines added, I closed it and converted my existing BSDDB
database to sqlite.  I was able to open the converted database without
adding newlines to the files.  In the past, I've never been able to open
either an empty or converted sqlite database.  I would get an error
about a problem with the bsddb database and the database would be locked.

>
>
>>
>> Now that I've gotten this far, I may give sqlite another try to see if
>> it solves the problem I frequently have when I leave Gramps open for
>> too long.
>>
>
> Good idea.  We may stop supporting BSDDB at some point in the future.
> SQLite is the default backend for v5.1.
>
>
> Nick.
>
>
>
>


--
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: What has the Berkeley Database got to do with Gramps?

Keith Jacobs
In reply to this post by Keith Jacobs

Hi Sam

This one was easily checked as I use Firefox,

Firstly I checked and I have GTK-3 v3.22.30 installed so greater than the version required.

I then successfully opened Firefox and saved a complete webpage to my "Network" drive,

But thanks for your input.

Regards
Keith Jacobs
On 23/06/2019 07:16, Sam Manzi wrote:
Sorry looks to related to this GTK issue and unrelated to Gramps itself.

Bug#1714518 "GTK+3 doesn't show FUSE/GVFS, smb (SMB/CIFS), sftp (SFTP/SSH) network shares in file chooser"

Which was fixed in GTK+ 3.22.28 or greater as mentioned in this comment:

Essentially this means unless GTK is upgraded you will continue to have this issue.


On Sun, 23 Jun 2019 at 16:06, Sam Manzi <[hidden email]> wrote:
Link to associated bug reports

11141: Accessing Database on Network Drive

11039: sqlite3.OperationalError: attempt to write a readonly database


On Sat, 22 Jun 2019 at 22:12, Keith Jacobs <[hidden email]> wrote:
I have previously reported this problem as a BUG but have not received a solution so I am hoping that by opening it up to a wider audience that I might  find someone with a solution.

 




--
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: What has the Berkeley Database got to do with Gramps?

Keith Jacobs
In reply to this post by Nick Hall

Nick

Here are the results of my testing, inclusive of syntax errors.

keith@keith-HP-Laptop-15-bs0xx:~$ python
Python 2.7.15+ (default, Nov 27 2018, 23:36:35)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> with open("test.txt", "w") as f:
...     f.write("test")
... with open("test.txt", r) as f:
  File "<stdin>", line 3
    with open("test.txt", r) as f:
       ^
SyntaxError: invalid syntax
>>> with open("test.txt", "r") as f:
...     print (f.readline())
... import os
  File "<stdin>", line 3
    import os
         ^
SyntaxError: invalid syntax
>>> os.stat("test.txt)
  File "<stdin>", line 1
    os.stat("test.txt)
                     ^
SyntaxError: EOL while scanning string literal
>>> os.stat("test.txt")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'os' is not defined
>>> os.path.exists("test.txt")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'os' is not defined
>>> os.path.isfile("test.txt")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'os' is not defined
>>>

I have also copied a working Gramps SQLite database from the local drive to the "Network" drive and was able to open it.

However on trying to create a new person at the point of saving Gramps reported an unknown error the details of which are

67686: ERROR: grampsapp.py: line 143: Unhandled exception
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gramps/gui/editors/editperson.py", line 872, in save
    self.db.commit_person(self.obj, trans)
  File "/usr/lib/python3/dist-packages/gramps/gen/db/generic.py", line 1807, in commit_person
    old_data = self._commit_base(person, PERSON_KEY, trans, change_time)
  File "/usr/lib/python3/dist-packages/gramps/plugins/db/dbapi/dbapi.py", line 609, in _commit_base
    pickle.dumps(obj.serialize())])
  File "/usr/lib/python3/dist-packages/gramps/plugins/db/dbapi/sqlite.py", line 127, in execute
    self.__cursor.execute(*args, **kwargs)
sqlite3.OperationalError: attempt to write a readonly database

I therefore cancelled the new person creation without saving and tried to Abandon Changes and Quit and Gramps reported "Cannot Abandon Session Changes" because the number of changes made in the session exceeded the limit.

I hope this helps.

The reason I want to operate in this manner is that I have a Dual Monitor Workstation in my study on the second floor, where I do the majority of my research but us a laptop on the ground floor for creating reports and occasional research.

Regards
Keith Jacobs
On 22/06/2019 19:14, Nick Hall wrote:
On 22/06/2019 18:18, Keith Jacobs wrote:
Can you provide some guidance for testing?

Create a file with:

> with open("test.txt", "w") as f:
>     f.write("test")

Read it with:

> with open("test.txt", "r") as f:
>     print (f.readline())

Run some tests with:

> import os

> os.stat("test.txt")

> os.path.exists("test.txt")

> os.path.isfile("test.txt")

This will check that we can read and write files from python.


Nick.




--
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: What has the Berkeley Database got to do with Gramps?

Nick Hall
On 23/06/2019 16:07, Keith Jacobs wrote:
Python 2.7.15+ (default, Nov 27 2018, 23:36:35)

You need to use python3.

Don't include the ">".  For the indents use 4 spaces.

Nick.




--
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: What has the Berkeley Database got to do with Gramps?

Keith Jacobs
In reply to this post by Nick Hall
Success

My very grateful thanks to Nick Hall who has not only helped me whilst I
struggle with Linux but also stuck with this problem which I have now
managed to resolve.

The solution is to mount the network drive with sudo mount -t cifs -o
file_mode=0777,user=username,pass=password,guest,uid=1000,gid=1000,dir_mode=0777,vers=1.0
//192.168.0.254/usb_storage /mnt/Samba and then set the Gramps "Family
Tree Datapath" to /mnt/Samba/Gramps

The problem, as I suspected, was the fact that files on the network
drive would not report their permissions, with the above command all
permissions, of files on the network drive can now be read.

I now just have to master editing FSTAB with vi to make this happen at
startup, though I suspect there may be some redundant options in my
mount command but hay it works.


e, vRegards
Keith Jacobs

On 22/06/2019 16:51, Nick Hall wrote:


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org