We recently upgraded to DF 2.2 and are bumping into some issues with the custom scripting.
[This one was an issue in 2.1.2 as well, but we hoped the upgrade would fix it.] Requests other than HTTP GET requests don’t seem to be working for us with Python scripting. For example, I have an extremely basic custom service to test the Python scripting that just throws an exception - that’s it. The exception is only thrown on GET requests, but not other types. The same holds true for pre- and post-process scripts. When I just try to throw an exception to make sure things work on a specific table, the GET pre-process script works in Python, but it’s totally ignored if I move it to the POST pre-process script. I’ve tried more advanced scripts than just throwing an exception, but obviously that doesn’t work either. Other types of requests do, however, seem to work in the other scripting languages, including Node.js.
Following up on that (this is less of an issue and more of a request), after upgrading to 2.2, Python scripting stopped working altogether. After spending some time digging through the stack trace and the source code of df-core, I was able to see that the Python scripting engine imports the “bunch” module, which wasn’t installed on our system. Installing this seems to have fixed that specific problem. Are there requirements listed on the wiki somewhere for using Python (or other scripting engines)? They’d certainly be nice to have so small things like this can be easily avoided or solved. I’m going to apologize in advance if they do exist somewhere and I just totally missed them!
Small bug - if I create a new custom scripting service with no code in the “Config” tab, I then am unable to edit and save the Service in the future. For example, I create a new custom Node.js scripting service, put no code in the “Config” tab, and click save. Then, I come back to the service later, go to the “Config” tab, enter some code, and hit save, but nothing happens - no success flash message, and the service remains unchanged.
Sorry to list these all here. Please let me know if there’s anything else you need from me. Our instance details are below. Thank you!!!
Admin Application Version: 2.2.1
DreamFactory Version: 2.2.0
System Database: mysql
Operating System: RHEL 7.2