Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Rapidwright jython through script and eclipse setup issue #991

Open
nandithaec opened this issue May 2, 2024 · 2 comments
Open

Comments

@nandithaec
Copy link

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

Next, although I did install eclipse, it does not seem to load the gitrepo

Screenshot from 2024-05-01 21-47-14

@clavin-xlnx
Copy link
Member

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

public static String[] addImportsForCommandLineOption(String[] args) {
). 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?

@nandithaec
Copy link
Author

nandithaec commented May 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants