# Unable to determine resource path

**URL:** <https://gramps.discourse.group/t/unable-to-determine-resource-path/4957>\
**Category:** Development\
**Tags:** install\
**Created:** [February 23, 2024, 8:31pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957 "2024-02-23T20:31:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [February 23, 2024, 8:31pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/1 "2024-02-23T20:31:32Z")

</div>

When I install 5.2 from source, and then try to start it by typing ‘gramps’, I see

ResourcePath.ERROR: Unable to determine resource path

Wasn’t that supposed to be fixed?

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [February 23, 2024, 8:40pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/2 "2024-02-23T20:40:50Z")

</div>

Which installation scheme did you use? Gramps will look in the usual places.

If your resource path can’t be found, you can provide it by using the `RESOURCE_PATH` environment variable.

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [February 23, 2024, 9:50pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/3 "2024-02-23T21:50:08Z")

</div>

I did a standard install as documented in the INSTALL file. And in previous installations, that meant that I never had to bother about those resources. And I thought that we had a fix for that, written by Jean Michault, but it appears that that PR is still open:

> <https://github.com/gramps-project/gramps/pull/1614>
>
> automatically detects the resource path in two additional cases:
> \* distribution… of sources without git
> \* egg distribution

Note that it seems that we still have eggs.

I tried the install in my LMDE 6 partition, which is based on Debian bookworm. Setting the GRAMPS\_RESOURCES variable (to the path with the eggs) helped, but led to a locale error that I couldn’t solve.

---

<div class="post-metadata">

**Author:** ![jacrider](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jacrider](https://gramps.discourse.group/u/jacrider)\
**Post date:** [February 23, 2024, 10:20pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/4 "2024-02-23T22:20:41Z")

</div>

I encountered the same problem on Kubuntu 23.10.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [February 23, 2024, 10:28pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/5 "2024-02-23T22:28:36Z")

</div>

> [@ennoborg](#):
>
> I did a standard install as documented in the INSTALL file.

The standard install is this following:

```python
python3 setup.py build
sudo python3 setup.py install

```

Is that what you mean?

I just tested it again using `--root` to install it to test directory. It worked fine for me. I ran it with `python -m gramps` and it picked up the correct resource path without a problem.

I can see an egg directory, but that isn’t where I ran it from.

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [February 23, 2024, 10:35pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/6 "2024-02-23T22:35:19Z")

</div>

Yes, that’s what I mean. I had a standard 5.1 install on that partition on it, and that worked without special provisions.

I tried again after removing the old Gramps first, but that didn’t help either.

And on reading jacrider’s comments, I won’t try the install on my normal Mint yet, because that’s also based on ubuntu.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [February 23, 2024, 10:38pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/7 "2024-02-23T22:38:11Z")

</div>

Did you try starting it with `python -m gramps` from the package directory as I suggested?

On Arch the installation directories are:

code: usr/lib/python3.11/site-packages/gramps  
locale: usr/share/locale  
resources: user/share/gramps

Where does your install put things?

I got the interface in French by using `LANGUAGE=fr`.

Starting using the gramps script was more difficult. I had to set the `PYTHONPATH`, but it worked.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [February 23, 2024, 10:40pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/8 "2024-02-23T22:40:47Z")

</div>

> [@ennoborg](#):
>
> And I thought that we had a fix for that, written by Jean Michault, but it appears that that PR is still open

This PR appears to be about running Gramps from an egg without installing it. I haven’t tested it yet.

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [February 23, 2024, 11:26pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/9 "2024-02-23T23:26:27Z")

</div>

I didn’t try the other things, because I think that in the end, the gramps command should just work. That’s what we demand with a .deb package too, once that is released.

What I mean is that I could try all sorts of things, but the install should make sure that I don’t need to, just like it does in previous versions.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [February 23, 2024, 11:33pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/10 "2024-02-23T23:33:08Z")

</div>

My questions are just to help me understand why it works for me but not for you.

Is it python version related? or perhaps distribution related? I don’t know without some debugging information, such as where it installed your files.

I only have to set the `PYTHONPATH` when I deliberately install to a really weird location, but that is expected. Even then it still finds the resource path automatically.

It is very difficult to debug a problem that I can’t reproduce.

---

<div class="post-metadata">

**Author:** ![jacrider](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jacrider](https://gramps.discourse.group/u/jacrider)\
**Post date:** [February 24, 2024, 2:03am UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/11 "2024-02-24T02:03:54Z")

</div>

I don’t know what information would help if it is working for you. The output of the build and install commands is too large to include here and I don’t see any errors. But the only files installed on my system are /usr/local/bin/gramps, /usr/local/lib/python3.11/dist-packages/easy-install.pth, and the large directory tree /usr/local/lib/python3.11/dist-packages/gramps-5.2.0-py3.11.egg, so I would guess that extracting the egg is not working correctly.

---

<div class="post-metadata">

**Author:** ![jacrider](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jacrider](https://gramps.discourse.group/u/jacrider)\
**Post date:** [February 24, 2024, 2:37am UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/12 "2024-02-24T02:37:21Z")

</div>

I haven’t been keeping up with developments in Python, and I’ve never worked with egg packages, so I decided to do a little research and discovered that egg files were replaced by wheel files last year. There were messages at the beginning of the install about “setup.py install” and easy\_install being deprecated and that pypa/build, pypa/installer, or other standards-based tools should be used. I don’t know if this could be causing the problem as I’m using the latest Kubuntu.

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [February 24, 2024, 3:00am UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/13 "2024-02-24T03:00:31Z")

</div>

The whole thing was discussed earlier, in October 2023, and in that thread, you can also read about the fix that Jean Michault made for it.

And because it was discussed then, and he made a PR, I thought that it would have been fixed in this release.

---

<div class="post-metadata">

**Author:** ![jacrider](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jacrider](https://gramps.discourse.group/u/jacrider)\
**Post date:** [February 24, 2024, 3:05am UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/14 "2024-02-24T03:05:04Z")

</div>

With some experimentation, I got something that runs. I unzipped the egg file and found three directories, EGG-INFO, gramps, and share. I copied EGG-INFO and gramps to /usr/local/lib/python3.11/dist-packages and share to /usr/local/. However, the first thing I encountered was a failure to load the Narrated Web Site plugin with the error message “name ‘localAlphabeticIndex’ is not defined”. At this point, I’m ready to go back to 5.1.6 until these problems are resolved.

---

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [February 24, 2024, 7:36am UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/15 "2024-02-24T07:36:19Z")

</div>

To support Enno’s comments I tried unsuccessfully to install RC1 on my  
spare Ubuntu 22 machine and gave up after quite a number of hours with  
the same issues as described to the point where I have done a clean  
install of Ubuntu Mate and parked things until the .deb has been released.  
Phil

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [February 24, 2024, 12:44pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/16 "2024-02-24T12:44:06Z")

</div>

I understand that, and the answer lies in a change of the setup script that was made months ago. That was supposed to be a modernization, which is necessary for modern Debian versions, I think, but the install part has a fatal error, that one can only find by running the install and typing gramps, or starting Gramps from the menu.

And since the installer is destructive, in the sense that it overwrites your existing installation, and there is no remove either, it is quite nasty to test, also because most things look normal. When I run it, the locales seem to be there, but they don’t work in LMDE 6, based on Debian bookworm, and they don’t work on ubuntu either, which is based on an older Debian version.

And when this happens, running a 5.1 installer, from source, or from a .deb file, doesn’t work either, so you need timeshift to roll back your whole system. That works here most of the times, but I prefer to avoid that in my production environment, because it can be risky.

We have a thread with a lot of technical details here, started by Jean Michault:

> [@Difficulties with building debian package 5.2](https://gramps.discourse.group/t/difficulties-with-building-debian-package-5-2/4343):
>
> Hello, i am trying to build debian package 5.2 from git sources. step 1 : obtains sources git clone https://github.com/gramps-project/gramps.git -b maintenance/gramps52 cd gramps step 2 : build package # build source distribution python3 setup.py sdist # extract sources from source distribution cd dist tar zxf gramps-5.2.0rc1.tar.gz # rename source distribution to what expect debuild mv gramps-5.2.0rc1.tar.gz gramps\_5.2.0.orig.tar.gz # run debuild cd gramps-5.2.0rc1 export LANG=C debuild F…

And I hope that we can find ways to test source distributions including build and install on Arch, Debian, Fedora, and ubuntu, before releasing. And I know that that might not always be easy.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [February 24, 2024, 1:56pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/17 "2024-02-24T13:56:53Z")

</div>

> [@jacrider](#):
>
> But the only files installed on my system are /usr/local/bin/gramps, /usr/local/lib/python3.11/dist-packages/easy-install.pth, and the large directory tree /usr/local/lib/python3.11/dist-packages/gramps-5.2.0-py3.11.egg, so I would guess that extracting the egg is not working correctly.

Thank you. That is the information that I needed to know.

On Arch Linux, I the code is installed in `python/pthon3.11/site-packages/gramps`. It is not in an egg. There is another directory called `python/pthon3.11/site-packages/gramps-5.2.0-py3.11.egg-info` but this only contains metadata.

This also explains why Jean Michault wanted to run it from an egg. I couldn’t understand why someone would want to run an egg, and was thinking of a realistic scenario where I could install an egg and test his PR.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [February 24, 2024, 2:12pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/18 "2024-02-24T14:12:32Z")

</div>

> [@ennoborg](#):
>
> And I hope that we can find ways to test source distributions including build and install on Arch, Debian, Fedora, and ubuntu, before releasing.

I tested all three supported installation schemes on Arch Linux and they worked fine.

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [February 24, 2024, 2:55pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/19 "2024-02-24T14:55:33Z")

</div>

Since I got the same egg as jacrider, it looks like the failure to extract the egg is a common factor between plain Debian (and LMDE 6) and Ubuntu (and regular Mint). And that should be visible in the install log somewhere, but that log is huge.

I could make version 5.2 run because on my system there was a folder named ‘share’ inside the egg folder, and that worked as a resource path. The locale kept failing however.

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [February 24, 2024, 3:07pm UTC](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957/20 "2024-02-24T15:07:41Z")

</div>

> [@Nick-Hall](#):
>
> I tested all three supported installation schemes on Arch Linux and they worked fine.

When I look at wikipedia, it seems that Arch is an independent distribution. Is that right?

And would you agree that we should at least test the install code on the other ones that I mentioned? Debian and Ubuntu are almost one family, and Fedora is another. There are more candidates in the DistroWatch top 10, but we can skip the ones that are based on Debian or Ubuntu.

[Next page](https://gramps.discourse.group/t/unable-to-determine-resource-path/4957.md?page=2)
