You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I just add a line import numpy I get the error:
Traceback (most recent call last):
File "/grist/sandbox/grist/engine.py", line 985, in _recompute_one_cell
result = col.method(record, table.user_table)
File "usercode", line 353, in Spent
import numpy
ImportError: No module named numpy
Even though I didn't turn on sandboxing. (I tried with gvisor and without it - the same error).
Also, I tried to modify the /sandbox/grist/gencode.py#L173 file as described below by the same link, but then tables stopped loading in the browser and in the docker logs a saw this error [Sandbox] KeyError u'Projects' (the name of the table where I tried to use the formula is 'Projects'; this part changes according to the table name where I use the import in formulas).
Steps to reproduce
Dockerfile:
FROM gristlabs/grist:1.1.18
RUN \
apt update && apt install -y openssl && \
python3 -m pip install numpy
compose.yml
services:
grist:
build: .container_name: gristcap_add:
- SYS_PTRACEenvironment:
GRIST_SINGLE_ORG: default-teamports:
- 8484:8484volumes:
# Where to store persistent data, such as documents.
- ./volumes/grist:/persistrestart: unless-stopped
Describe the expected behavior
Import will work correctly. I can use import numpy in formulas.
New behaviour discovered. I can reproduce it only with the imported document (from the Desktop version if it matters).
When I create a new document and write
import numpy
return None
it doesn't show errors o_0
Oh, and it works with the new table in the same document as well.
But not with a new column in the existing table, for example 🤯
Describe the current behavior
I know that Grist natively doesn't support adding additional libraries, so I tried a workaround from this link: https://community.getgrist.com/t/install-third-party-libraries/1087
But when I just add a line
import numpy
I get the error:Even though I didn't turn on sandboxing. (I tried with
gvisor
and without it - the same error).Also, I tried to modify the /sandbox/grist/gencode.py#L173 file as described below by the same link, but then tables stopped loading in the browser and in the docker logs a saw this error
[Sandbox] KeyError u'Projects'
(the name of the table where I tried to use the formula is 'Projects'; this part changes according to the table name where I use the import in formulas).Steps to reproduce
Dockerfile:
compose.yml
Describe the expected behavior
Import will work correctly. I can use
import numpy
in formulas.Where have you encountered this bug?
Instance information (when self-hosting only)
The text was updated successfully, but these errors were encountered: