Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working ^ #1

Closed
bilelmoussaoui opened this issue Jan 10, 2021 · 9 comments
Closed

Not working ^ #1

bilelmoussaoui opened this issue Jan 10, 2021 · 9 comments

Comments

@bilelmoussaoui
Copy link
Contributor

bilelmoussaoui commented Jan 10, 2021

Coming from flathub/flathub#2036

I still can't make ^ work properly, the issue is probably related to my locale

bilelmoussaoui@fedora ~ > locale 
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

That's all I get from the terminal

bilelmoussaoui@fedora ~/P/contrast (wip/cdavis/gtk4) [SIGINT]> flatpak run com.github.alexhuntley.Plots
Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 264, in on_pointer_move
    self.cursor.mouse_select(element, direction, drag=True)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 341, in mouse_select
    self.selection_bounds, self.selection_ancestor = self.calculate_selection()
TypeError: cannot unpack non-iterable NoneType object
Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 147, in do_draw_cb
    self.expr.draw(ctx, self.cursor, widget_transform)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 652, in draw
    super().draw(ctx, cursor, widget_transform)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 551, in draw
    self.index_in_parent in cursor.selection_bounds:
TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 147, in do_draw_cb
    self.expr.draw(ctx, self.cursor, widget_transform)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 652, in draw
    super().draw(ctx, cursor, widget_transform)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 551, in draw
    self.index_in_parent in cursor.selection_bounds:
TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 264, in on_pointer_move
    self.cursor.mouse_select(element, direction, drag=True)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 341, in mouse_select
    self.selection_bounds, self.selection_ancestor = self.calculate_selection()
TypeError: cannot unpack non-iterable NoneType object
Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 264, in on_pointer_move
    self.cursor.mouse_select(element, direction, drag=True)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 341, in mouse_select
    self.selection_bounds, self.selection_ancestor = self.calculate_selection()
TypeError: cannot unpack non-iterable NoneType object
Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 264, in on_pointer_move
    self.cursor.mouse_select(element, direction, drag=True)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 341, in mouse_select
    self.selection_bounds, self.selection_ancestor = self.calculate_selection()
TypeError: cannot unpack non-iterable NoneType object
Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 147, in do_draw_cb
    self.expr.draw(ctx, self.cursor, widget_transform)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 652, in draw
    super().draw(ctx, cursor, widget_transform)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 551, in draw
    self.index_in_parent in cursor.selection_bounds:
TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 147, in do_draw_cb
    self.expr.draw(ctx, self.cursor, widget_transform)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 652, in draw
    super().draw(ctx, cursor, widget_transform)
  File "/app/lib/python3.8/site-packages/plots/formula.py", line 551, in draw
    self.index_in_parent in cursor.selection_bounds:
TypeError: argument of type 'NoneType' is not iterable
Shader compile failure (0): b"0:74(9): error: `s' undeclared\n0:74(2): error: `return' with wrong type error, in function `formula0' returning float\n"
Shader compile failure (0): b"0:74(9): error: `s' undeclared\n0:74(11): error: `i' undeclared\n0:74(9): error: operands to arithmetic operators must be numeric\n0:74(2): error: `return' with wrong type error, in function `formula0' returning float\n"
Shader compile failure (0): b"0:74(9): error: `sin' undeclared\n0:74(2): error: `return' with wrong type error, in function `formula0' returning float\n"

I think it could need some "Help page" with the list of operations you can use and how you can type them :)

@alexhuntley
Copy link
Owner

Thanks for reporting this. Which keyboard layout are you using? And what are you doing to get the TypeError exceptions?

@alexhuntley
Copy link
Owner

I think it could need some "Help page" with the list of operations you can use and how you can type them :)

I'll open another issue :)

@bilelmoussaoui
Copy link
Contributor Author

Thanks for reporting this. Which keyboard layout are you using? And what are you doing to get the TypeError exceptions?

Opening the app and writing something on the equation field. My keyboard layout is BE_fr

@alexhuntley
Copy link
Owner

Could you checkout branch bug-1, run
python3 -m plots
from the repo root, type in ^ and paste the output please?

@alexhuntley
Copy link
Owner

Just thinking, this issue is probably because circumflex is a dead key in AZERTY layouts

@bilelmoussaoui
Copy link
Contributor Author

Just thinking, this issue is probably because circumflex is a dead key in AZERTY layouts

That's probably the cause indeed.

@alexhuntley
Copy link
Owner

alexhuntley commented Jan 10, 2021

Potentially fixed, could you try the latest commit on branch bug-1 please? 6da57d9

@bilelmoussaoui
Copy link
Contributor Author

Can confirm it fixes my issue, thanks!

@alexhuntley
Copy link
Owner

Fantastic! The fix is in v0.1.4, which should be on Flathub soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants