2,786 questions
2
votes
0
answers
69
views
Jython calls wrong method when trying to call Java method with a boolean
My Java class has several flavors of the same method with each method taking a different Java type as an argument. One takes an int, one takes a boolean, etc.
When my Python code calls method(True), ...
2
votes
1
answer
90
views
Can I reuse an instance of PythonInterpreter - perhaps via PyCode object?
I have a script that I load via:
python = new PythonInterpreter();
String script = "script I loaded from somewhere"
try {
python.exec(script);
} catch (Exception e) {
...
1
vote
2
answers
65
views
How to apply Gephi layouts using Jython
I'm generating and updating multiples graphs and I'm setting features like text labels, size and color nodes. Besides I need the same process of layout Yifan Hu (It is nice, the best!) and some cases ...
0
votes
0
answers
32
views
I keep getting a failure connecting Spring Boot and Python
[update]
Sorry guys! processbuilder works fine, but it was my other problem. It was just that I didn't run it in a virtual environment with the libraries needed for my python code installed... Thanks!
...
1
vote
1
answer
72
views
ExecuteScript with Jython: 'ascii' codec can't encode character u'\ufffd' in position 28: ordinal not in range(128)
I am stuck with an error with the encoding of non-ascii characters from a FlowFile content, in NiFi. I am processing the text with an ExecuteScript processor using Jython.
The flow is a simple ...
0
votes
1
answer
832
views
How to Add Authorization Header for API Scanning in OWASP ZAP with OpenAPI?
I'm using OWASP ZAP to scan an API, and I've successfully imported the OpenAPI definition. However, I'm struggling to configure the Authorization header (specifically for a JWT token) so that it is ...
2
votes
0
answers
68
views
Update resource reference of websphere application through Jython script
I am trying to update the resource reference of datasources of a websphere application through jython script rather than providing bindings through applications’ binding XML files.
I have tried below ...
0
votes
0
answers
262
views
Best Practices for Integrating Python Scripts with Spring Boot via Jython
We're working on a Full Stack Spring Boot project. One of our team members has developed a Python script for web scraping and audio (speech) integration to interact with the data. This script has been ...
0
votes
1
answer
84
views
Jython API copy method does not seem to work
I am using the following Python 2 method, in which the parameter of the method is a Jython object (task) :
def getTaskPosition(task):
"""Gets the current position of the task in its ...
0
votes
1
answer
155
views
How can I install Jython in Sketchware?
I'm trying to use Jython in a Sketchware project to run some Python code. I'm not sure how to install and set up Jython in Sketchware. Could someone guide me through the steps required to integrate ...
0
votes
0
answers
127
views
Unable to generate tracks using TrackMate macro
I'm quite new to scripting and I've attempted to create a TrackMate macro using the tutorials online.
My images are dark spots on a light background so I have to invert the image and I also resize the ...
0
votes
1
answer
132
views
The variable is not bound error while trying to find an element using xpath (JYTHON SUT script) QF test
I have a simple SUT script (JYTHON). I'm trying to perform a basic operation wherein I'm finding a link that has the text "Welcome" and then clicking on it.I checked in the console and the ...
0
votes
1
answer
107
views
Websphere jython: How to clear messages in specific queuepoint SIBus
Sometimes cause of system intermitten or stop abnormal, hung thread, so messages stills in queuepoint of SIBus, these messages looks like dead messages, they can't continue processing also can't clear....
0
votes
1
answer
128
views
Apache POI 4.1.1 - Why is this fillPatternType error showing up?
I am getting the following error:
NameError: global name 'FillPatternType' is not defined
From this code:
oStyle.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.index) oStyle.setFillPattern(...
1
vote
0
answers
348
views
What are the attributes for the showAttribute() method of the AdminConfig object?
I would like to know what are the attributes for the showAttribute() method of the AdminConfig object ?
The AdminConfig object is used to invoke configuration commands and to create, read, update and ...
0
votes
0
answers
36
views
How can i fix the Jython no named module error
Im trying to use java gui in intellij to make a login screen for a instagram scrapper program ran on a python file. However, i need to run the python file from java and so i'm using Jython to try and ...
3
votes
0
answers
87
views
Importing Jython into a JavaFX application
I am trying to add Python functionality to a javaFX application using Jython (with Maven in the IntelliJ IDE). To do this used the following dependency:
<dependency>
<groupId>...
0
votes
1
answer
113
views
How to validate/ignore optional value while validating it using 'Validate CSV' processor in Apache NiFi?
I'm new to Apache Nifi Community and I got stuck at one point - please help me for the below problem :
In Validate CSV processor I'm giving below schema(schema_used) to validate the CSV input. But, ...
1
vote
0
answers
80
views
Jython: syntax check available?
I am using Jython for a simple Python script task inside a Java app.
Properties ps = new Properties();
ps.put ("python.console.encoding", "UTF-8");
ps.put ("python.import.site&...
2
votes
2
answers
125
views
Unable to execute -m ensurepip with Jython Jar
I am unable to execute the following command"
java -jar ~/.m2/repository/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar -m ensurepip
I get the following stack trace. Can anyone please ...
0
votes
0
answers
177
views
How to automate Swing application using Swing library (or) Remote Swing Library
I need to automate jnlp application. Currently i chose swing library with robot framework for automation. I need help in configuring intellij with libraries/jars. I tried many methods, but library is ...
4
votes
1
answer
333
views
How to Add Java Libraries to Jython Project in PyCharm Community Edition?
I'm currently working on a Jython project (using Jython 2.7.3) in PyCharm Community Edition (2023.2.3) and I'm having difficulty configuring Java libraries in the IDE. Although my code runs fine when ...
0
votes
1
answer
218
views
Sikuli jython function with Region as argument is not working
I've Sikuli script on jython, which purpose is to sequentialy wait to appear and click images.
According to Sikuli it can be done with wait and click functions. Both functions take same argument - ...
0
votes
1
answer
842
views
how to configure python in jmeter
i have created a python code to display data in the database, I want to test and see the value of Throughput, Latency, Resource utilization and Error Rate of the code using the jmeter application.
but ...
0
votes
1
answer
45
views
Include Python Classifier Model in Java
I have developed an ML Classifier Model in Python and I want to consume it from java.
I have looked up some options like Jython etc.
Can anyone help me, how could I achieve this use case?
I tried to ...
0
votes
0
answers
117
views
Python modules using Jython
I am trying to make some utils for a Python script that run using Jython 2.7.0 (I could update if needed)
My current problem is pretty simple, i can't import/use my module
For a bit of context, my ...
2
votes
0
answers
94
views
Proper usage of Jython's PythonInterpreter for multiple scripts
Suppose I have a list of Python scripts, 'script1.py', 'script2.py', 'script3.py', etc. Using Jython (which is embedded into my Java application), my goal is to run each script when the Java program ...
1
vote
1
answer
55
views
Control Edit Properties of JTable in Jython
How would I be able to set certain columns of a JTable to be editable/not editable in Jython?
My table:
self.table_data = []
data_model = DefaultTableModel(self.table_data, self.colnames)
self.table = ...
1
vote
1
answer
761
views
How to get AST from Python code, change it, and write it back to file, in Java?
Question
How can one read an arbitrary Python file, build an abstract syntax tree from it, modify that, and then write the modified AST back to file, in Java? (Small note, for a concrete syntax tree (...
2
votes
0
answers
250
views
How to create GUI components using Ghidra Python Scripting?
Is someone here with experience in developing Python script for Ghidra?
It seems that there is not much information about python scripts, especially for GUI components.
I would like to create some GUI ...
0
votes
0
answers
103
views
How can I use an ExecuteScript processor to run a python script that reads unzipped data from an Unpack Content processor in Nifi?
I am trying to read and use the data that has come from an Unpack content processor with my python script. I know that I am supposed to use an Execute script processor to run the python script but I ...
0
votes
1
answer
325
views
Error with imports when loading own python extension in burp
I'm currently trying to create my own Burp extension to automatize testing. For this, I want to run script I made before via Burp. I need to import differents libraries for this, such as requests.
To ...
0
votes
0
answers
128
views
I am using jython library in java to execute a python script but it is not fetch python libraries
This the java code i am using
public void get_Inv_hash_ids(String token ,String url ,String url1) {
try {
String pythonPath = "/Users/milind.yadav/anaconda3/bin/...
1
vote
1
answer
124
views
Error managing bytes array while trying to code my first Burp extension
I'm currently trying to code my first burp extension in python and I have an error when it comes to managing bytes array which I get from the response. I used a, probably, outdated tutorial which use ...
0
votes
0
answers
142
views
Python script to compare the data types of a CSV in Apache NiFi
I have created this Python script to compare the data types of a CSV coming from the InputStream with an array of data types,
but I don't understand why I'm getting an error in line number 7 in NiFi.
...
0
votes
0
answers
50
views
How to create a copy of an array with unusual typecode in Jython
I am using the Java library nom-tam-fits for reading and writing FITS files within Jython 2.7. I need to manipulate the underlying data arrays in the FITS HDUs however I am not able to make copies of ...
2
votes
2
answers
246
views
Stop webserver on particular node using wsadmin (jython)
Is there any way to stop webserver on particular node using wsadmin?
Using
print AdminConfig.list('WebServer')
I got the list of all webservers with coresponding nodes
webserver1(cells/dmgrCell01/...
2
votes
0
answers
69
views
Install Module pdfminer in Jython
I trying to connect a Python script with a Java project that uses Maven. To achieve this, I need to install a module into the Jython environment. I have tried the following approach.
C:\Users\lordonez\...
0
votes
1
answer
76
views
Why Do I Get List Indices Error When Changing How My Functions Are Called
This method is grabbing data from an API, and using a library I partially wrote called CAP. It takes three parameters the first two of which are dates, the third being an empty list to return data to.
...
2
votes
0
answers
189
views
Type comment list of values
I'm using Jython 2.1, so I cannot use type annotations ({var}: {type}) but I use type comments (# type: {type} for variables and # type: ({param_type}) -> {ret_type} for functions).
I would like to ...
2
votes
0
answers
117
views
Can't install Jython packages
I'm trying to install Jython swingutils, but I get the following error whenever I try to install any package using pip: "No module named _winreg"
I am using Windows 10, and use Eclipse as my ...
1
vote
0
answers
46
views
Jython jInternalFrame Listener
I was able to get a listener working for a JFrame, but I'm missing something with doing the same thing with a JInternalFrame. I built up some basic code from various samples I found, and I'm hoping ...
1
vote
0
answers
83
views
Jython, wrong number of expected arguments
I'm writing a graphics app in Jython 2.7, and am doing something fundamentally wrong. I've stripped out most of the code for this question, and with the following code I get "TypeError: setColor()...
-2
votes
2
answers
4k
views
How to get JRE root path for java 17 using "java -verbose -version"
I have a problem that with my automation script where it needs to get the JRE Root path for java versions. I managed to get the path for java 8 and java 11 using java -verbose -version
enter image ...
2
votes
0
answers
280
views
Jython 2.7.3: Filereader: TypeError: read(): 1st arg can't be coerced to java.nio.CharBuffer, char[]
I am trying to read from a file: test1.txt
the file has only one line: abcdefghigk
java -jar jython-standalone-2.7.3.jar
Jython 2.7.3 (tags/v2.7.3:5f29801fe, Sep 10 2022, 18:52:49)
[Java HotSpot(TM) ...
0
votes
0
answers
63
views
Calling python having imports from 3rd party modules from Java using jython gives ImportModuleError [duplicate]
I am trying to create a maven java project which calls python script that have imports from 3rd party modules like pandas. I have installed Python3 and installed pandas using pip command. I am using ...
0
votes
1
answer
553
views
How to set Owner of SR in Maximo to first viewer
I want to create automation script, every time when I choose ticket in my list in service request and if owner is null to fill owner with logged user. I can not use automation script launch with ...
0
votes
1
answer
177
views
How can I check that my application is shutdown with QFTest?
I check a Java application with QFTest. I need to prove that the HMI is stopped at Shutdown.
In QFTest, I created a Jython procédure which try to send a socket to the HMI, if it can't, then it means ...
1
vote
1
answer
71
views
webbrowser library is not working as intended on SikulixIDE
On SikulixIDE, the library webbrowser always open the default browser, even when i use the get method, i tried my code on regular python, it does work. Anyone know why it is reacting like that ?
...
-1
votes
2
answers
83
views
sorting out data from two rows in csv file python
I have two rows of data in row 4 and 5. Row 4 has the titles for the data and row 5 holds the actual data. I want to go ahead and sort them out in any sort of format. I am completely new to python so ...