Re: [GNC] Multinational Accounting question...
Am 13.12.20 um 02:49 schrieb John Ralls: > You'll probably want to enter a rate manually as the spot market rate > retrieved by Finance::Quote is unlikely to be the one you need. The next F::Q release will have a modul for the European Central Bank. Their reference rates are usually accepted at least by EU member states. Regards Frank ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
[GNC] systemd / sqlite 3 file not found error
Hi all, On Fedora Linux here, and I am trying to set up a systemd timer to pull price quotes once a week using gnucash-cli. Previously I was using cron to accomplish this, but would like to migrate to a systemd timer because this is on a laptop and I never know when it will be on or off. Systemd timers can handle missed execution times gracefully by simply running the command the next time the system is up. I've set it up to execute this command: /usr/bin/flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get /path/to/Books-sql.gnucash Strangely, this produces a file not found error even though I've verified the path is correct. * 09:50:20 WARN [GncDbiBackend::session_begin()] Sqlite3 file Books-sql.gnucash not found * 09:50:20 ERROR [scm_cleanup_and_exit_with_failure()] Session Error: Sqlite3 file Books-sql.gnucash not found This isn't an issue with how I've set up the systemd timer or service, because when I run it as root from the command line, I get the same result. Thanks for any insight! Colin ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
Re: [GNC] systemd / sqlite 3 file not found error
> On Dec 13, 2020, at 9:57 AM, Colin Arndt wrote: > > Hi all, > > On Fedora Linux here, and I am trying to set up a systemd timer to pull price > quotes once a week using gnucash-cli. Previously I was using cron to > accomplish this, but would like to migrate to a systemd timer because this is > on a laptop and I never know when it will be on or off. Systemd timers can > handle missed execution times gracefully by simply running the command the > next time the system is up. > I've set it up to execute this command: > /usr/bin/flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get > /path/to/Books-sql.gnucash > > Strangely, this produces a file not found error even though I've verified the > path is correct. > * 09:50:20 WARN [GncDbiBackend::session_begin()] > Sqlite3 file Books-sql.gnucash not found > * 09:50:20 ERROR [scm_cleanup_and_exit_with_failure()] Session > Error: Sqlite3 file Books-sql.gnucash not found > This isn't an issue with how I've set up the systemd timer or service, > because when I run it as root from the command line, I get the same result. > Thanks for any insight! Is /path/to somewhere accessible by the flatpak's sandbox? Regards, John Ralls ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
Re: [GNC] systemd / sqlite 3 file not found error
On Sun, Dec 13, 2020 at 09:57:46AM -0800, Colin Arndt wrote: > Hi all, > > On Fedora Linux here, and I am trying to set up a systemd timer to pull > price quotes once a week using gnucash-cli. Previously I was using cron > to accomplish this, but would like to migrate to a systemd timer because > this is on a laptop and I never know when it will be on or off. Systemd > timers can handle missed execution times gracefully by simply running the > command the next time the system is up. > I've set it up to execute this command: > /usr/bin/flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes > get /path/to/Books-sql.gnucash > Use anacron, put the thing you want to run in /etc/cron.weekly. On many systems it will actually use systemd to implement things but anacron is the generic way of doing what you want to do. -- Chris Green ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
Re: [GNC] systemd / sqlite 3 file not found error
Hi John, Flatpak access makes sense as the culprit. The .gnucash file is in my home folder. The command completes when I run it as my user. Run as root, it fails. Perhaps I'm trying to do something in a way it's not designed to be used? Thanks again, Colin On Dec 13 2020, at 10:10 am, John Ralls wrote: > > > > On Dec 13, 2020, at 9:57 AM, Colin Arndt wrote: > > > > Hi all, > > > > On Fedora Linux here, and I am trying to set up a systemd timer to pull > > price quotes once a week using gnucash-cli. Previously I was using cron to > > accomplish this, but would like to migrate to a systemd timer because this > > is on a laptop and I never know when it will be on or off. Systemd timers > > can handle missed execution times gracefully by simply running the command > > the next time the system is up. > > I've set it up to execute this command: > > /usr/bin/flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get > > /path/to/Books-sql.gnucash > > > > Strangely, this produces a file not found error even though I've verified > > the path is correct. > > * 09:50:20 WARN [GncDbiBackend::session_begin()] > > Sqlite3 file Books-sql.gnucash not found > > * 09:50:20 ERROR [scm_cleanup_and_exit_with_failure()] Session > > Error: Sqlite3 file Books-sql.gnucash not found > > This isn't an issue with how I've set up the systemd timer or service, > > because when I run it as root from the command line, I get the same result. > > Thanks for any insight! > > Is /path/to somewhere accessible by the flatpak's sandbox? > Regards, > John Ralls > ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
Re: [GNC] systemd / sqlite 3 file not found error
No, but using flatpak (or any other container system) adds constraints on what you can do because of the sandbox. Surely you can get systemd to run the job as you instead of as root. Regards, John Ralls > On Dec 13, 2020, at 10:28 AM, Colin Arndt wrote: > > Hi John, > > Flatpak access makes sense as the culprit. > > The .gnucash file is in my home folder. > > The command completes when I run it as my user. Run as root, it fails. > > Perhaps I'm trying to do something in a way it's not designed to be used? > > Thanks again, > Colin > > > On Dec 13 2020, at 10:10 am, John Ralls wrote: > > > > On Dec 13, 2020, at 9:57 AM, Colin Arndt wrote: > > > > Hi all, > > > > On Fedora Linux here, and I am trying to set up a systemd timer to pull > > price quotes once a week using gnucash-cli. Previously I was using cron to > > accomplish this, but would like to migrate to a systemd timer because this > > is on a laptop and I never know when it will be on or off. Systemd timers > > can handle missed execution times gracefully by simply running the command > > the next time the system is up. > > I've set it up to execute this command: > > /usr/bin/flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get > > /path/to/Books-sql.gnucash > > > > Strangely, this produces a file not found error even though I've verified > > the path is correct. > > * 09:50:20 WARN [GncDbiBackend::session_begin()] > > Sqlite3 file Books-sql.gnucash not found > > * 09:50:20 ERROR [scm_cleanup_and_exit_with_failure()] Session > > Error: Sqlite3 file Books-sql.gnucash not found > > This isn't an issue with how I've set up the systemd timer or service, > > because when I run it as root from the command line, I get the same result. > > Thanks for any insight! > > Is /path/to somewhere accessible by the flatpak's sandbox? > > Regards, > John Ralls ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
[GNC] Translators: Updated po files for coming Gnucash 4.3
Dear translators and intersted users, we have just merged the frozen strings for the Gnucash 4.3 release into the po files. Please send us your updated translations until noon 26 December UTC-8. Have fun Frank https://wiki.gnucash.org/wiki/Translation ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
Re: [GNC] systemd / sqlite 3 file not found error
Usually jobs that work for some types of logins and fail for others are either due to differences in file access permission or differences in environment variables. Maybe when it runs as root, the $PATH variable is different and it is not finding something. Or some other environment variable is different. On 2020 Dec 13, at 12-13 12:28:36, Colin Arndt wrote: Hi John, Flatpak access makes sense as the culprit. The .gnucash file is in my home folder. The command completes when I run it as my user. Run as root, it fails. Perhaps I'm trying to do something in a way it's not designed to be used? Thanks again, Colin On Dec 13 2020, at 10:10 am, John Ralls wrote: > > >> On Dec 13, 2020, at 9:57 AM, Colin Arndt wrote: >> >> Hi all, >> >> On Fedora Linux here, and I am trying to set up a systemd timer to pull >> price quotes once a week using gnucash-cli. Previously I was using cron to >> accomplish this, but would like to migrate to a systemd timer because this >> is on a laptop and I never know when it will be on or off. Systemd timers >> can handle missed execution times gracefully by simply running the command >> the next time the system is up. >> I've set it up to execute this command: >> /usr/bin/flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get >> /path/to/Books-sql.gnucash >> >> Strangely, this produces a file not found error even though I've verified >> the path is correct. >> * 09:50:20 WARN [GncDbiBackend::session_begin()] >> Sqlite3 file Books-sql.gnucash not found >> * 09:50:20 ERROR [scm_cleanup_and_exit_with_failure()] Session >> Error: Sqlite3 file Books-sql.gnucash not found >> This isn't an issue with how I've set up the systemd timer or service, >> because when I run it as root from the command line, I get the same result. >> Thanks for any insight! > > Is /path/to somewhere accessible by the flatpak's sandbox? > Regards, > John Ralls > ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All. ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
Re: [GNC] systemd / sqlite 3 file not found error
Hi John and Will, Thanks for the responses and help troubleshooting! It was super simple to specify this to be run as my user account in the service file. The technique is to add a "User=" line. In case anyone else is interested, here's what worked. Change the path and username to suit. /etc/systemd/system/priceget.service has the contents: [Unit] Description=Get price quotes in GnuCash [Service] Type=simple ExecStart=/usr/bin/flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get /path/to/books.gnucash User=yourusername [Install] WantedBy=multi-user.target /etc/systemd/system/priceget.timer has the contents: [Unit] Description=Get price quotes in GnuCash [Timer] OnCalendar=Mon 09:00:00 Persistent=true [Install] WantedBy=timers.target Best, Colin On Dec 13 2020, at 12:59 pm, John Ralls wrote: > No, but using flatpak (or any other container system) adds constraints on > what you can do because of the sandbox. Surely you can get systemd to run the > job as you instead of as root. > > Regards, > John Ralls > > > On Dec 13, 2020, at 10:28 AM, Colin Arndt wrote: > > > > Hi John, > > > > Flatpak access makes sense as the culprit. > > > > The .gnucash file is in my home folder. > > > > The command completes when I run it as my user. Run as root, it fails. > > > > Perhaps I'm trying to do something in a way it's not designed to be used? > > > > Thanks again, > > Colin > > > > > > On Dec 13 2020, at 10:10 am, John Ralls wrote: > > > > > > > On Dec 13, 2020, at 9:57 AM, Colin Arndt wrote: > > > > > > Hi all, > > > > > > On Fedora Linux here, and I am trying to set up a systemd timer to pull > > > price quotes once a week using gnucash-cli. Previously I was using cron > > > to accomplish this, but would like to migrate to a systemd timer because > > > this is on a laptop and I never know when it will be on or off. Systemd > > > timers can handle missed execution times gracefully by simply running the > > > command the next time the system is up. > > > I've set it up to execute this command: > > > /usr/bin/flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes > > > get /path/to/Books-sql.gnucash > > > > > > Strangely, this produces a file not found error even though I've verified > > > the path is correct. > > > * 09:50:20 WARN [GncDbiBackend::session_begin()] > > > Sqlite3 file Books-sql.gnucash not found > > > * 09:50:20 ERROR [scm_cleanup_and_exit_with_failure()] Session > > > Error: Sqlite3 file Books-sql.gnucash not found > > > This isn't an issue with how I've set up the systemd timer or service, > > > because when I run it as root from the command line, I get the same > > > result. > > > Thanks for any insight! > > > > Is /path/to somewhere accessible by the flatpak's sandbox? > > > > Regards, > > John Ralls > ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. - Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.