GNU bug report logs -
#29365
openmolar looking in /usr/share/openmolar
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29365 in the body.
You can then email your comments to 29365 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#29365
; Package
guix
.
(Mon, 20 Nov 2017 17:34:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Quiliro Ordonez Baca <quiliro <at> riseup.net>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Mon, 20 Nov 2017 17:34:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When starting OpenMolar for the first time, it has an error when it
creates the application database:
ERROR - error creating database tables
Traceback (most recent call last):
File "/gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/lib/python3.5/site-packages/openmolar/create_db.py", line 145, in create_tables
f = open(fp, "r")
FileNotFoundError: [Errno 2] No existe el fichero o el directorio: '/usr/share/openmolar/resources/schema.sql'
when it should look for the following file:
/gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/share/openmolar/resources/schema.sql
The flaw in the definition is in:
/gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/lib/python3.5/site-packages/openmolar/settings/localsettings.py: SHARE_DIR = os.path.join("/usr", "share", "openmolar")
I do not know haw to fix it. Please instruct how to do it.
Added tag(s) easy.
Request was from
ludo <at> gnu.org (Ludovic Courtès)
to
control <at> debbugs.gnu.org
.
(Tue, 21 Nov 2017 13:39:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#29365
; Package
guix
.
(Wed, 22 Nov 2017 09:37:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 29365 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Quiliro Ordonez Baca <quiliro <at> riseup.net> writes:
> When starting OpenMolar for the first time, it has an error when it
> creates the application database:
>
> ERROR - error creating database tables
> Traceback (most recent call last):
> File "/gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/lib/python3.5/site-packages/openmolar/create_db.py", line 145, in create_tables
> f = open(fp, "r")
> FileNotFoundError: [Errno 2] No existe el fichero o el directorio: '/usr/share/openmolar/resources/schema.sql'
>
> when it should look for the following file:
> /gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/share/openmolar/resources/schema.sql
>
> The flaw in the definition is in:
> /gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/lib/python3.5/site-packages/openmolar/settings/localsettings.py: SHARE_DIR = os.path.join("/usr", "share", "openmolar")
>
> I do not know haw to fix it. Please instruct how to do it.
Based on your assessment, it looks like the problem is that the
application hard-codes the "/usr" directory path.
One solution for this problem is to replace that line of code in the
source with the correct path. You can do this in the package definition
by using the substitute* macro provided by the (guix build utils)
module. In fact, it looks like the current package definition for
openmolar already attempts to do this. Run "guix edit openmolar" to
view the current package definition.
Perhaps you could modify the package definition to also replace the path
in localsettings.py? You might also want to look around in the source
for other paths that need to be fixed (a command such as "grep -r /usr"
might be helpful).
For information on how to use substitute*, please refer to
guix/build/utils.scm in the Guix source tree. For general information
on hacking on Guix, check the section titled "Contributing" in the
manual (e.g., run info '(guix) Contributing' in a terminal).
--
Chris
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#29365
; Package
guix
.
(Wed, 22 Nov 2017 17:14:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 29365 <at> debbugs.gnu.org (full text, mbox):
Adding to what Chris Marusich described:
'substitute* works somewhat in the following way:
--8<---------------cut here---------------start------------->8---
(substitute FILE-string-or-FILE-list-of-strings
((EREGEX-string SYMBOLS-to-put-both-entire-match-and-captures-or-NOTHING)
REPLACEMENT-string))
--8<---------------cut here---------------end--------------->8---
For example:
--8<---------------cut here---------------start------------->8---
(substitute "file1.txt"
(("a")
"b")
;; ... would replace every "a" with "b".
(("1([[:digit:]]*)([^[:digit:]])" full capture1 capture2)
(string-append full
" 2"
capture1
capture2)))
;; ... would replace "1234A" and "1A" with "1234A 2234A" and "1A 2A",
;; respectively.
(substitute '("file2.txt"
"file3.txt"
"file4.txt")
(("a\\*\n") ; matches literal asterisk (*) followed by a new
; line/line feed.
"b")
;; ... from "a*[newline]" to "b".
(("(1)[^[:digit:]]*" _ interesting-one) ; use "_" capture to not save
; the whole match.
(string-append interesting-one
" 1")))
;; ... from "1A" or from "1ABC" to "1 1" ("A" and "ABC" parts are
;; discarded).
--8<---------------cut here---------------end--------------->8---
Notice that the regular expression that GNU Guile uses is the extended
one (Extended Regular Expression). See the info page for Guile for more
details (type `info guile' in the terminal, and go to the section
"Regular Expressions", inside that section notice that there is one
talking about backslash escapes, this one is also important for reasons
that you'll see in the next paragrah).
Notice that in Guile backslashes in strings also have special meaning,
so one has to take into account string+regex special meaning when doing
backslash escapes. In the examples given, the replacement for
"file2.txt" onwards shows us how to deal with this.
I hope this helps! ;)
2017-11-22T01:35:59-0800 Chris Marusich wrote:
>
> Based on your assessment, it looks like the problem is that the
> application hard-codes the "/usr" directory path.
>
> One solution for this problem is to replace that line of code in the
> source with the correct path. You can do this in the package definition
> by using the substitute* macro provided by the (guix build utils)
> module. In fact, it looks like the current package definition for
> openmolar already attempts to do this. Run "guix edit openmolar" to
> view the current package definition.
>
> Perhaps you could modify the package definition to also replace the path
> in localsettings.py? You might also want to look around in the source
> for other paths that need to be fixed (a command such as "grep -r /usr"
> might be helpful).
>
> For information on how to use substitute*, please refer to
> guix/build/utils.scm in the Guix source tree. For general information
> on hacking on Guix, check the section titled "Contributing" in the
> manual (e.g., run info '(guix) Contributing' in a terminal).
--
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
(apenas sem DRM), PNG, TXT, WEBM.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#29365
; Package
guix
.
(Wed, 20 Dec 2017 20:12:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 29365 <at> debbugs.gnu.org (full text, mbox):
Chris Marusich <cmmarusich <at> gmail.com> writes:
> Quiliro Ordonez Baca <quiliro <at> riseup.net> writes:
>
>> When starting OpenMolar for the first time, it has an error when it
>> creates the application database:
>>
>> ERROR - error creating database tables
>> Traceback (most recent call last):
>> File "/gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/lib/python3.5/site-packages/openmolar/create_db.py", line 145, in create_tables
>> f = open(fp, "r")
>> FileNotFoundError: [Errno 2] No existe el fichero o el directorio: '/usr/share/openmolar/resources/schema.sql'
>>
>> when it should look for the following file:
>> /gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/share/openmolar/resources/schema.sql
>>
>> The flaw in the definition is in:
>> /gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/lib/python3.5/site-packages/openmolar/settings/localsettings.py: SHARE_DIR = os.path.join("/usr", "share", "openmolar")
>>
>> I do not know haw to fix it. Please instruct how to do it.
>
> Based on your assessment, it looks like the problem is that the
> application hard-codes the "/usr" directory path.
Yes.
> One solution for this problem is to replace that line of code in the
> source with the correct path. You can do this in the package definition
> by using the substitute* macro provided by the (guix build utils)
> module. In fact, it looks like the current package definition for
> openmolar already attempts to do this. Run "guix edit openmolar" to
> view the current package definition.
Exactly. It already attempts to do that in:
(arguments
`(#:use-setuptools? #f
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-/usr
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "setup.py"
(("/usr") (assoc-ref outputs "out")))
#t)))))
> Perhaps you could modify the package definition to also replace the path
> in localsettings.py? You might also want to look around in the source
> for other paths that need to be fixed (a command such as "grep -r /usr"
> might be helpful).
$ grep -R /usr
lib/python3.5/site-packages/openmolar/dbtools/records_in_use.py:#! /usr/bin/env p
lib/python3.5/site-packages/openmolar/settings/localsettings.py: SHARE_DIR = os.path.join("/usr", "share", "openmolar")
Coincidencia en el fichero binario lib/python3.5/site-packages/openmolar/settings/__pycache__/localsettings.cpython-35.pyc
openmolar has three dependencies:
python-pyqt+sqcintilla
python-mysqlclient
qscintilla
But only python-pyqt+sqcintilla files have /usr on them (besides openmolar's). Perhaps the
problem is that package definition. But I cannot figure how to do it yet.
> For information on how to use substitute*, please refer to
> guix/build/utils.scm in the Guix source tree. For general information
> on hacking on Guix, check the section titled "Contributing" in the
> manual (e.g., run info '(guix) Contributing' in a terminal).
I find that it is needed to download the source. But I do not have a
connection to the web. I have to travel 1 hour every time I need to
connect. Is there any way i can use Emacs to have all necesary files for
hacking on Guix?
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sat, 10 Feb 2024 21:57:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Quiliro Ordonez Baca <quiliro <at> riseup.net>
:
bug acknowledged by developer.
(Sat, 10 Feb 2024 21:57:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 29365-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Marco Rimoldi <rimarko <at> libero.it> skribis:
> This commit fixes https://issues.guix.gnu.org/29365.
Alright, applied!
> The package now fails to start with this error message:
>
> File "/gnu/store/zzys4bqllx3a3gramwj2pyyigfb4z75b-openmolar-1.1.6-g81838c85/lib/python3.10/site-packages/openmolar/qt4gui/customwidgets/toothProps.py", line 827, in shapes
> self.mesial.setPoints(
> TypeError: 'float' object cannot be interpreted as an integer
>
> I will submit a new issue if the patch is accepted.
That’d be great.
Thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 10 Mar 2024 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 47 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.