jython scripting - jython.modulepath example

706 views
Skip to first unread message

Javi D R

unread,
Mar 9, 2021, 5:42:10 AM3/9/21
to OWASP ZAP Developer Group
Hi

I am struggling to use external dependencies with jython scripting. Is there any example i can use as a reference to see how it is done?

Thanks

kingthorin+owaspzap

unread,
Mar 9, 2021, 5:53:04 AM3/9/21
to OWASP ZAP Developer Group

Javi D R

unread,
Mar 9, 2021, 5:54:55 AM3/9/21
to OWASP ZAP Developer Group
I have seen that. I have set that option and im importing the yaml library, but im having this error

  File "<script>", line 7, in <module>
  File "/Users/javi/Library/Python/3.8/lib/python/site-packages/yaml/__init__.py", line 399
    class YAMLObject(metaclass=YAMLObjectMetaclass):
                             ^
SyntaxError: mismatched input '=' expecting RPAREN
Traceback (most recent call last):
  File "<script>", line 7, in <module>
  File "/Users/javi/Library/Python/3.8/lib/python/site-packages/yaml/__init__.py", line 399
    class YAMLObject(metaclass=YAMLObjectMetaclass):
                             ^
SyntaxError: mismatched input '=' expecting RPAREN

Maybe it needs a specific python version?



thc...@gmail.com

unread,
Mar 9, 2021, 5:56:39 AM3/9/21
to zaproxy...@googlegroups.com
The Jython add-on does not support Python 3.

Best regards.

Javi D R

unread,
Mar 9, 2021, 6:00:41 AM3/9/21
to OWASP ZAP Developer Group
Ah, that makes sense then. So it needs to be a python2 dependency. Thanks!
Reply all
Reply to author
Forward
0 new messages