Client for GNU Health

I am a new user when it comes to GNU Health and Tryton. I am trying to install GNU Health on the Mac OS (Catalina), and I seem to have gotten most of the way, but I am having trouble connecting to the server over a web interface or using the Desktop Mac OS Tryton client.

Via the browser, I get a 405 error, and using the Desktop client (version 6.x) I get an “incompatible version of the server” error. The GNU Health Server version is 3.8.0.

I tried installing a client using PIP and I get a bunch of errors, mostly related to:

Failed to build pycairo PyGObject
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

I could probably setup most of it on an UBUNTU VM if that is necessary.

Did you installed sao (the web client) on the server?

You must use the client from the same series as the server. I guess you have 5.0 series as server so you must use the client 5.0.

It is not easy to install from source on MacOS. The client is build using https://brew.sh/ to install all the dependencies.

Is there some place to get a 5.x version of the Mac OS client ? I did not see a “legacy” link for old builds of the Mac OS Desktop client on the website. I guess another option would be to run a client from UBUNTU running in a VM / Parallels ?

I am pretty familiar with brew / homebrew and already have it on my system. Are there instructions somewhere on how to built the client for Mac OS from source as you describe ? I am not even sure of GNU Health server runs on a Mac, but it might.

You just have to set the proper series in the URL like: http://downloads.tryton.org/5.0/

Thanks. I guess the trytond version is 5.0.41 based on:

/Users/sscotti/gnuhealth/tryton/server/trytond-5.0.41/bin/trytond  --version

I’ll give it a try. I guess GNU Health is normally run on SUSE LINUX. Never even used Tryton before.

Looks like that may have worked ?

Follow up to my previous post. The Tryton Desktop Client works, but I’d like to use the sao web client also if that is possible. It looks like maybe I would have to get the sao client from here:

https://hg.tryton.org/sao/branches

and use the one for the version, 5.x I am using ? I tried doing that and some of the libraries are missing and I probably need to config it a bit.

e.g.

"dist/tryton-sao.js and dist/tryton-sao.css

Another option would be to use the gnuhealth client installed using pip, but that does work on my Mac OS system yet. See:

https://en.wikibooks.org/wiki/GNU_Health/Installation#Installation_of_the_GNU_Health_Client

Thanks.

It is probably better to use the release from http://downloads.tryton.org/5.0/tryton-sao-last.tgz

You need to follow the sao: 0697d302877b README.md which is written for using the release.
(The Development part is when using the source repository).

Thanks. That is close. I get a bunch of 405 and other errors now, but it does load using the web interface. I am using Mac OS (Catalina).

Looks like those files mostly just don’t exist ? custom.css and custom.js I can just create for my own customization ? There is not locale for en_US.json / en.json ? Not sure what this one is:

POSThttp://localhost:8001/ghdemo38/bus
[HTTP/1.0 501 NOT IMPLEMENTED 44ms]

Bus not supported

This might actually work out OK to get started with some local development. I don’t know if you are familiar with GNUHealth that much, but if I make changes to the .xml or python files for some of the modules do I have to restart the server to see the changes reflected when I run the app, or do they occur in real-time ?

All of the 404 / 405 / 501 “errors” you’ve noted are not a problem, and sao should work fine.

Correct, sao will work perfectly without them.

These files are requested based on the language you have your browser set to. As
there is no real need to translate from English (the default) to English (your browsers settings) there are no en_US.json or en.json files needed, but they are requested just in case you have created them and added your own “translations”. If your browser was set to another language then the translations for that other language would be requested.

See: Bus — Tryton server

If you make any changes to the python files you will need to restart the server (unless you are running it in development mode) and then restart the desktop client (unless you are also running that in development mode) or for the web client reload the browser page. If you make changes to any of the xml files you may also need to first update the database.

But something you should be aware of is that it is not a good idea to change any of the existing python or xml files as they will get overwritten when you update your system. Instead the right way of extending, or altering, the system is to create a new Tryton module and put your code in there. You may find this topic useful for that: Training module for Tryton

Thank you for all of the feedback. Guess it will be a bit of a “learning curve”, although surprised that it is actually up and running on MacOS. Is there a default en.json and en.po file in case I want to customize them ? That would also get rid of the 404 errors for that ? I’ll have to read up about the “Bus” feature. That could be useful.

For GNU Health startup I see this. Would I just use the ‘–dev’ option then ? I am using the web client now, so reloading the page is not a problem. I’ll read up about modifying existing modules because what I’m interested in doing is further developing existing modules in the GNU Heath package.

Thanks for all of your help.

/Users/sscotti/Desktop/gnuhealth-3.8.0/start_gnuhealth.sh --help
\e[0;36m2021-11-27 18:19:55 [INFO] Starting GNU Health Server version 3.8.0 …\e[m
usage: trytond [-h] [–version] [-c FILE [FILE …]] [-v] [–dev]
[-d DATABASE [DATABASE …]] [–logconf FILE] [–pidfile FILE]

optional arguments:
-h, --help show this help message and exit
–version show program’s version number and exit
-c FILE [FILE …], --config FILE [FILE …]
Specify configuration files
-v, --verbose enable verbose mode
–dev enable development mode
-d DATABASE [DATABASE …], --database DATABASE [DATABASE …]
specify the database name
–logconf FILE logging configuration file (ConfigParser format)
–pidfile FILE file where the server pid will be stored

Yes, it can be quite steep…

No, but if you are really interested, you could look at the ones for the other languages, however I think it is very unlikely you’d ever need to customize them.

I really wouldn’t worry about the 404 errors, it’s just the server’s way of saying to the client there aren’t any translations for that language.

Yes, for standard trytond the option is --dev, and based on your message it looks like it’s the same when starting gnuhealth.

Thanks. Got me started anyways. Never used Tryton or GNU Health before. Looks pretty interesting.

A post was split to a new topic: Installing GNU Health: Method Not Allowed