“Error” when trying to access “scripts” in system administration & when trying to add a new script in a base. The only log information is:
django.request:228 log_response Internal Server Error: /api/v2.1/admin/scripts-tasks/
I have tried the suggested solution of deleting and reinstalling SeaTable + MariaDB containers and their configuration a few times, but the problem persists.
My version is 2.5.0 Developer Edition (self-hosted) on Windows 10 pc. It is a clean docker installation with one super user.
I am sorry my previous statement was not correct. The Developer Edition can run Python scripts, but you have to configure the FaaS Scheduler and the Python runner.
DTABLE_WEB_SERVICE_URL = ‘127.0.0.1’
SEATABLE_FAAS_AUTH_TOKEN = ‘ea4df715d05144ff8a741654d79f4780’ # Token to copy to SeaTable’s configuration file
for seatable-faas
SEATABLE_FAAS_AUTH_TOKEN = ‘ea4df715d05144ff8a741654d79f4780’ # Token from seatable_faas_scheduler_settings.py
SEATABLE_FAAS_URL = ‘127.0.0.1/faas’ # URL of the SeaTable FAAS Scheduler
There were no errors and both FAAS scheduler and SeaTable containers are running. But, I still don’t see the Script’s page for Python in SeaTable (shows Error).
Quoting the manual: “It is strongly recommended to install SeaTable FAAS Scheduler and Python Runner on a separate host. Running these two components on the same machine as SeaTable is very likely to cause conflicts.”
Ok… thanks for pointing it out… that probably explains why Python wouldn’t work… but what about Javascript? I don’t see that either. What do I need for Javascript? I see the same ‘Error’ for Scripts in the sys admin menu.
Thanks… I have removed Python runner and FAAS Scheduler (/opt/seatable-python-runner and /opt/seatable-faas-scheduler directories) now. The error message as seen in the GIF above persists. If Javascripts can’t be added from the sys admin, please let me know what is the correct way to add Javascripts to SeaTable. For example, I need to click a button to execute a Javascript for a row (using column type: button and action: run script). In the select script field, I am unable to add any script.
Daniel meant that the Javascript cannot be listed in the “Scripts” menu in the admin navigation. That is to say, in your screenshot above, the “Error” is merely caused by the Python feature.
JavaScript is a standard part of SeaTable. There’s no way to configure it. So there must be something wrong with your installation.
I would be curious how it looks in your base editor. Judging from your description above, I wonder if you have really found how to add a new script.
When you click on “Scripts” in your editor, what happens?
Oh, yes… you’re right about the “Scripts” in the editor. The small icon next to Plugins went unnoticed… Thanks for pointing this out. Now, I can see the screen exactly as you have shown in the screenshot. Does this mean that I can directly write the scripts from this screen and execute them by choosing ‘run script’ for buttons? Of course, from the above messages, I understand that Python scripts won’t work this way unless FAAS and Python Runner are configured on different machines.
PS: I got the impression that scripts have to appear under sys admin only because Plugins have to be added that way from under sys admin before choosing them for your bases.
Yes, just give it a try, you’ll find it is easy and a lot of fun to use! The scripts are saved in your base and you can use the button to call them in each table.
The “Scripts” in the admin menu is only for the system administrator to overview who created which regular execution tasks for the Python scripts. I don’t think this part is interesting for you at the moment, right? On the other hand, I think this menu will be removed soon (but I’m not sure), as the automation rule can run Python scripts regularly, too.
Of course, did I mention that we have a very detailed scripts programming manual? There you can find almost all the simple examples you need to understand, get used to and make good use of the SeaTable scripts: