Open nandithaec opened 6 months ago
I am trying the rapidwright jython using the interactive commandline format. The commands are working. But, when I put the commands in a script and run using
rapidwright jython script.py
, it gives the following error:File "script.py", line 2, in <module> device = Device.getDevice("xczu9eg-ffvb1156-2-e") NameError: name 'Device' is not defined
The RapidWright Jython interpreter, as a convenience, will automatically import many classes automatically: (see https://github.com/Xilinx/RapidWright/blob/b9cdb4f6b40931237a196ba129f658612b9c5753/src/com/xilinx/rapidwright/util/Jython.java#L56). When writing a script and running it, you will need to include those imports directly. For example, in the error message mentioned, you can import the Device
class by:
from com.xilinx.rapidwright.device import Device;
As for the issues setting up Eclipse, there could be a variety of issues going on. Although it is a bit old, did you try following the Eclipse setup guide (https://www.rapidwright.io/docs/RapidWright_Eclipse_Setup.html)? What version of Eclipse and what platform are you using? What version of Git?
Thanks. The first solution worked.
Regards, Nanditha
On Thu, May 2, 2024 at 11:59 AM Chris Lavin @.***> wrote:
I am trying the rapidwright jython using the interactive commandline format. The commands are working. But, when I put the commands in a script and run using rapidwright jython script.py, it gives the following error:
File "script.py", line 2, in
device = Device.getDevice("xczu9eg-ffvb1156-2-e") NameError: name 'Device' is not defined The RapidWright Jython interpreter, as a convenience, will automatically import many classes automatically: (see https://github.com/Xilinx/RapidWright/blob/b9cdb4f6b40931237a196ba129f658612b9c5753/src/com/xilinx/rapidwright/util/Jython.java#L56). When writing a script and running it, you will need to include those imports directly. For example, in the error message mentioned, you can import the Device class by:
from com.xilinx.rapidwright.device import Device;
As for the issues setting up Eclipse, there could be a variety of issues going on. Although it is a bit old, did you try following the Eclipse setup guide (https://www.rapidwright.io/docs/RapidWright_Eclipse_Setup.html)? What version of Eclipse and what platform are you using? What version of Git?
— Reply to this email directly, view it on GitHub https://github.com/Xilinx/RapidWright/issues/991#issuecomment-2090885649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALCZIFZTMIWVGX46OZM6YDZAJPHHAVCNFSM6AAAAABHC27DN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJQHA4DKNRUHE . You are receiving this because you authored the thread.Message ID: @.***>
I am trying the rapidwright jython using the interactive commandline format. The commands are working. But, when I put the commands in a script and run using
rapidwright jython script.py
, it gives the following error:Next, although I did install eclipse, it does not seem to load the gitrepo