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

Numpy not loading in Fennec on LineageOS 17.1 #2

Open
jondo opened this issue Feb 12, 2022 · 3 comments
Open

Numpy not loading in Fennec on LineageOS 17.1 #2

jondo opened this issue Feb 12, 2022 · 3 comments

Comments

@jondo
Copy link

jondo commented Feb 12, 2022

Input

plot(x=cos(t), y=sin(t))

How can it be better?

It should yield a plot instead of:

plot([ p1 = (cos(t), sin(t))
])
There was an error in Gamma. For reference the last five traceback entries are: Traceback (most recent call last):
  File "<exec>", line 15, in evcd
  File "/lib/python3.9/site-packages/gamma/logic.py", line 233, in eval_card
    result = card.eval(components, parameters)
  File "/lib/python3.9/site-packages/gamma/resultsets.py", line 95, in eval
    return self.card_info['eval_method'](components, parameters)
  File "/lib/python3.9/site-packages/gamma/resultsets.py", line 539, in eval_plot
    series = list(series.get_segments())
  File "/lib/python3.9/site-packages/sympy/plotting/plot.py", line 612, in get_segments
    points = type(self).get_data(self)
  File "/lib/python3.9/site-packages/sympy/plotting/plot.py", line 591, in get_data
    points = self.get_points()
  File "/lib/python3.9/site-packages/sympy/plotting/plot.py", line 923, in get_points
    sample(self.start, self.end, start, end, 0)
  File "/lib/python3.9/site-packages/sympy/plotting/plot.py", line 869, in sample
    random = 0.45 + np.random.rand() * 0.1
AttributeError: 'NoneType' object has no attribute 'random'
@eagleoflqj
Copy link
Owner

For some reason (maybe network) numpy isn't loaded in your case. Could you refresh to see if it goes normal (and optionally use F12 to check Network 4XX or 5XX)? I can reproduce it when I change numpy to a wrong name here:

await self.pyodide.loadPackage(["micropip", "docutils", "numpy", "sympy"])

Anyway I should provide a notification to show something is wrong.

@jondo
Copy link
Author

jondo commented Feb 12, 2022

It repeatedly fails with Fennec F-Droid 96.3.0 on my LineageOS 17.1 phone - both with mobile data and with WLAN, but it works with that phone's default web browser (Chromium 89).

For my tests, I have deactivated my Fennec add-ons.

It also works on another phone (Android 12) with the same Fennec F-Droid version in the same WLAN.
So the problem might not be easily reproducable - which can also be seen as good, I guess.

@eagleoflqj
Copy link
Owner

I tried Fennec F-Droid 96.3.0 on my HarmonyOS 2.0.0 (Android 10) and couldn't reproduce it either. I'll leave this issue open until a newer version of LineageOS and Fennec combination is confirmed to work.

@jondo jondo changed the title Error in parametric plot Numpy not loading in Fennec on LineageOS 17.1 Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants