unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65506: Anki: Preferences Dialog Broken
@ 2023-08-24 16:32 Christopher Howard
  2023-08-25 12:49 ` bug#65506: [PATCH] gnu: anki: Fix preferences error iyzsong--- via Bug reports for GNU Guix
  2023-08-25 12:52 ` bug#65506: Anki: Preferences Dialog Broken 宋文武 via Bug reports for GNU Guix
  0 siblings, 2 replies; 4+ messages in thread
From: Christopher Howard @ 2023-08-24 16:32 UTC (permalink / raw)
  To: 65506

Hello, The Anki program works well except that if I select Tools >> Preferences menu, I do not get a preferences menu, and instead I get this error:

```
Error 
An error occurred. Please use Tools > Check Database to see if that fixes the problem. 
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
Anki 2.1.16 (4bc33e2f) Python 3.10.7 Qt 5.15.8 PyQt 5.15.9
Platform: Linux
Flags: frz=False ao=False sv=2

Caught exception:
Traceback (most recent call last):
  File "/gnu/store/c6hiswiwspb70q7lfy61fwdyr3i1j6jz-anki-2.1.16/share/anki/aqt/main.py", line 881, in onPrefs
    aqt.dialogs.open("Preferences", self)
  File "/gnu/store/c6hiswiwspb70q7lfy61fwdyr3i1j6jz-anki-2.1.16/share/anki/aqt/__init__.py", line 82, in open
    instance = creator(*args)
  File "/gnu/store/c6hiswiwspb70q7lfy61fwdyr3i1j6jz-anki-2.1.16/share/anki/aqt/preferences.py", line 25, in __init__
    self.setupCollection()
  File "/gnu/store/c6hiswiwspb70q7lfy61fwdyr3i1j6jz-anki-2.1.16/share/anki/aqt/preferences.py", line 80, in setupCollection
    f.lrnCutoff.setValue(qc['collapseTime']/60.0)
TypeError: setValue(self, val: int): argument 1 has unexpected type 'float'
```    

Guix describe:

```
Generation 50	Aug 02 2023 07:39:20	(current)
  guix 6ccfa48
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: 6ccfa48d83b9c513b40835ae0c5896102b4dd915
```

Here is my system information:

```
christopher@theoden 
------------------- 
OS: Guix System x86_64 
Host: OptiPlex 9020 00 
Kernel: 5.15.120-gnu 
Uptime: 21 days, 22 hours, 20 mins 
Packages: 93 (guix-system), 197 (guix-user) 
Shell: bash 5.1.16 
Resolution: 1920x1080 
DE: GNOME 
Theme: Adwaita [GTK2/3] 
Icons: Adwaita [GTK2/3] 
Terminal: shepherd 
CPU: Intel i5-4570 (4) @ 3.600GHz 
GPU: AMD ATI Radeon HD 8490 / R5 235X OEM 
GPU: Intel HD Graphics 
Memory: 5752MiB / 7867MiB 
```

-- 
📛 Christopher Howard
🚀 gemini://gem.librehacker.com
🌐 http://gem.librehacker.com

בראשית ברא אלהים את השמים ואת הארץ




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#65506: [PATCH] gnu: anki: Fix preferences error.
  2023-08-24 16:32 bug#65506: Anki: Preferences Dialog Broken Christopher Howard
@ 2023-08-25 12:49 ` iyzsong--- via Bug reports for GNU Guix
  2023-08-28 10:54   ` bug#65506: [bug#65533] " 宋文武 via Bug reports for GNU Guix
  2023-08-25 12:52 ` bug#65506: Anki: Preferences Dialog Broken 宋文武 via Bug reports for GNU Guix
  1 sibling, 1 reply; 4+ messages in thread
From: iyzsong--- via Bug reports for GNU Guix @ 2023-08-25 12:49 UTC (permalink / raw)
  To: guix-patches; +Cc: 65506, 宋文武

From: 宋文武 <iyzsong@member.fsf.org>

Fixes <https://issues.guix.gnu.org/65506>.

* gnu/packages/education.scm (anki)[source]: Add snippet.
---
 gnu/packages/education.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index bb307cf7ab..21c8a60c0b 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -737,6 +737,13 @@ (define-public anki
                            version "-source.tgz"))
        (sha256
         (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))
+       (modules '((guix build utils)))
+       ;; #65506 Fix preferences error.
+       (snippet '(substitute* "aqt/preferences.py"
+                   (("qc\\['collapseTime']/60\\.0" x)
+                    (format #f "int(~a)" x))
+                   (("qc\\['timeLim']/60\\.0" x)
+                    (format #f "int(~a)" x))))
        (patches (search-patches "anki-mpv-args.patch"))))
     (build-system gnu-build-system)
     (arguments

base-commit: 1c916c167b7eb1f2f8af2cf621aa1512b00b1033
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#65506: Anki: Preferences Dialog Broken
  2023-08-24 16:32 bug#65506: Anki: Preferences Dialog Broken Christopher Howard
  2023-08-25 12:49 ` bug#65506: [PATCH] gnu: anki: Fix preferences error iyzsong--- via Bug reports for GNU Guix
@ 2023-08-25 12:52 ` 宋文武 via Bug reports for GNU Guix
  1 sibling, 0 replies; 4+ messages in thread
From: 宋文武 via Bug reports for GNU Guix @ 2023-08-25 12:52 UTC (permalink / raw)
  To: Christopher Howard; +Cc: 65506

Christopher Howard <christopher@librehacker.com> writes:

> Hello, The Anki program works well except that if I select Tools >> Preferences menu, I do not get a preferences menu, and instead I get this error:
>
> ```
> Error 
> An error occurred. Please use Tools > Check Database to see if that fixes the problem. 
> If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
> Anki 2.1.16 (4bc33e2f) Python 3.10.7 Qt 5.15.8 PyQt 5.15.9
> Platform: Linux
> Flags: frz=False ao=False sv=2
>
> Caught exception:
> Traceback (most recent call last):
>   File "/gnu/store/c6hiswiwspb70q7lfy61fwdyr3i1j6jz-anki-2.1.16/share/anki/aqt/main.py", line 881, in onPrefs
>     aqt.dialogs.open("Preferences", self)
>   File "/gnu/store/c6hiswiwspb70q7lfy61fwdyr3i1j6jz-anki-2.1.16/share/anki/aqt/__init__.py", line 82, in open
>     instance = creator(*args)
>   File "/gnu/store/c6hiswiwspb70q7lfy61fwdyr3i1j6jz-anki-2.1.16/share/anki/aqt/preferences.py", line 25, in __init__
>     self.setupCollection()
>   File "/gnu/store/c6hiswiwspb70q7lfy61fwdyr3i1j6jz-anki-2.1.16/share/anki/aqt/preferences.py", line 80, in setupCollection
>     f.lrnCutoff.setValue(qc['collapseTime']/60.0)
> TypeError: setValue(self, val: int): argument 1 has unexpected type 'float'
> ```    

Hello, thank you for the report!  It seems QSpinBox really want 'int'
instead of 'float' now.  I have sent a patch to fix this.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#65506: [bug#65533] [PATCH] gnu: anki: Fix preferences error.
  2023-08-25 12:49 ` bug#65506: [PATCH] gnu: anki: Fix preferences error iyzsong--- via Bug reports for GNU Guix
@ 2023-08-28 10:54   ` 宋文武 via Bug reports for GNU Guix
  0 siblings, 0 replies; 4+ messages in thread
From: 宋文武 via Bug reports for GNU Guix @ 2023-08-28 10:54 UTC (permalink / raw)
  To: 65533-done; +Cc: 宋文武, 65506-done

>
> * gnu/packages/education.scm (anki)[source]: Add snippet.
> ---
>  gnu/packages/education.scm | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
> index bb307cf7ab..21c8a60c0b 100644
> --- a/gnu/packages/education.scm
> +++ b/gnu/packages/education.scm
> @@ -737,6 +737,13 @@ (define-public anki
>                             version "-source.tgz"))
>         (sha256
>          (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))
> +       (modules '((guix build utils)))
> +       ;; #65506 Fix preferences error.
> +       (snippet '(substitute* "aqt/preferences.py"
> +                   (("qc\\['collapseTime']/60\\.0" x)
> +                    (format #f "int(~a)" x))
> +                   (("qc\\['timeLim']/60\\.0" x)
> +                    (format #f "int(~a)" x))))
>         (patches (search-patches "anki-mpv-args.patch"))))
>      (build-system gnu-build-system)
>      (arguments
>
> base-commit: 1c916c167b7eb1f2f8af2cf621aa1512b00b1033


Pushed now, closing.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-28 10:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24 16:32 bug#65506: Anki: Preferences Dialog Broken Christopher Howard
2023-08-25 12:49 ` bug#65506: [PATCH] gnu: anki: Fix preferences error iyzsong--- via Bug reports for GNU Guix
2023-08-28 10:54   ` bug#65506: [bug#65533] " 宋文武 via Bug reports for GNU Guix
2023-08-25 12:52 ` bug#65506: Anki: Preferences Dialog Broken 宋文武 via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).