Author Topic: An error occurred in the Python script, the exit code is 1  (Read 11129 times)

ekjones

  • Newbie
  • *
  • Posts: 7
    • View Profile
An error occurred in the Python script, the exit code is 1
« on: January 16, 2023, 08:01:22 PM »
Hi,

I have been trying to get R2D to work on my computer on and off for months now...but keep running into the same combination of errors. I have attached the .TXT file of what it returns to me. I even deleted everything from R2D and redownloaded everything.

What seems to keep happening is that the app keeps adding an extra "applications" folder? the path changes to:  C:\SimCenter\R2D_Windows_Download\applications\applications\python\python.exe: can't open file 'C:\SimCenter\R2D_Windows_Download\applications\applications\applications\createBIM\CSV_to_BIM\CSV_to_BIM.py': [Errno 2] No such file or directory

What am I missing?
Thanks.


fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 232
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #1 on: January 17, 2023, 07:07:28 AM »
Can you do the following:
1. Start tool, find the prefernces window and hit the reset and save buttons.
2. Now start an example with the run button
3. If it fails can you attach the debug.log file in ~/Documents/R2D and the .json file in ~/Documents/R2D/LocalWorkDir/tmp.SimCenter

thanks
frank

ekjones

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #2 on: January 30, 2023, 05:31:37 PM »
Hi!

So yeah it's still refusing to work. I tried redownloading everything on a different computer, but it is also not working. It says "python not found" when I try to run it locally (even though I am 99% sure python is there, in the path and everything). WHen I try to run it on design safe it tells me that I am signed in but doesn't produce anything after showing the message that a path was first created then deleted.

I'm also working on windows-- not sure if this changes anything.

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 232
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #3 on: January 31, 2023, 03:31:13 PM »
looking for the data to run the files .. are you running one of the examples? or did you find the example online somewhere .. sorry for delay .. just needing to see if files are missing something if an old example.

ekjones

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #4 on: January 31, 2023, 03:50:45 PM »
Hi yes so I loaded the examples in the tool, using the examples > manage examples. I reloaded everything and read some of the other comments, and made sure I had python 3.8 downloaded and everything and....it works! Meaning I can run the example 1 Basic HAZUS on my computer. For future troubleshooting in case this helps anyone else, it also started working when I (finally) followed the advice to download the R2D files into a C:/SimCenter folder that forks directly off the main disk (instead of C:/Users/ekjones/SimCenter).

The only problem I have now is that it won't let me run anything at DesignSafe....when I try to click there, it has me sign in (my account there is 'jonesemm'), which opens the pop up to name the job, and then when I click 'submit' the popup goes away (after a delay). But then nothing shows up in "Get from DesignSafe".

Attached is a text document of the program output -- let me know if there's something I am missing! The good thing is my computer can run things pretty well but it would be super useful to have that resource.

Additionally, as a separate detail, I noticed that the button "Export to PDF" in the results pane also doesn't work.

THANK YOU!!!
« Last Edit: January 31, 2023, 03:54:49 PM by ekjones »

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 232
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #5 on: January 31, 2023, 04:18:12 PM »
we should probably have a zoom call .. i am free between 9-10am pacific this morning and 3:30-5pm later today .. are you avail for either of these time slots?

ekjones

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #6 on: January 31, 2023, 05:32:58 PM »
Hi frank, can do a quick call I think right now (in a few minutes) - my email is ekjones017@gmail.com if you can send me a link!

jacklaoda

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #7 on: February 03, 2023, 02:45:29 AM »
Hi there, is there any update for this problem? I have the same issue. Thank you so much.

My Email jack110322012@g.ncu.edu.tw
« Last Edit: February 03, 2023, 03:58:53 AM by jacklaoda »

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 232
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #8 on: February 03, 2023, 08:58:56 PM »
There is an updated version of R2D in the preRelease folder that Emmaleah is trying out. If you want to have a look. It is not in the default folder as it spits out some junk messages when uploading files and I want to see what messages are spewing forth if it fails in the upload.

jacklaoda

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #9 on: February 05, 2023, 04:41:55 PM »
1 .  I have downloaded R2D_Windows_Download.zip ( Last Modified 2023/01/13).And I tried to test Example 2 in R2D ,but it couldn’t work.
It says "python not found" when I try to run it.

2.  I have download  an updated version of R2D in the preRelease folder( Last Modified 2023/02/03) . But the new version of R2D could not be open. The Error say that it could not find the file "Qt5Qml.dll,Qt5QuickWidgets.dll,......,Qt5OpenGl.dll"

My Email jack110322012@g.ncu.edu.tw
« Last Edit: February 05, 2023, 05:35:41 PM by jacklaoda »

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 232
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #10 on: February 10, 2023, 06:32:34 AM »

you need to go to the Preferences panel and hiut the reset button. python is included with the app. If the app is in: C:\SimCenter\R2D_Windows_Download then that should also be the path top the backend apps .. the path to Python, OpenSees and Dakota should contain that path plus a single applications folder .. if fddouble just edit the entries and press save.

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 232
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #11 on: February 10, 2023, 08:07:08 PM »
I have also just uploaded a new version of the zip file. it should say version 2.1.2

florencepugh

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: An error occurred in the Python script, the exit code is 1
« Reply #12 on: July 25, 2023, 02:50:42 AM »
I have also just uploaded a new version of the zip file. it should say version 2.1.2 contexto
That sounds great! Could you please let me know where I can download the new version 2.1.2 of the zip file?