question

Hao Zhou avatar image
0 Likes"
Hao Zhou asked Kavika F commented

TestFlexSimPy.py cannot run

Hello. I am trying to follow the instructions of the FlexSimPy GitHub Page and make the example TestFlexSimPy.py run on my computer. It seems that the packages are built correctly and a few DLLs are generated into the "python" folder. The GitHub package version is also matched with my FlexSim engine version 22.1.

However the TestFlexSimPy.py is not able to run since the FlexSimPy library is not able to imported. Please check the following image.

1676355498748.png

Could you provide suggestions to fix the issue and make the example run? Thanks so much!

FlexSim 22.1.2
pythonflexsimpy
1676355498748.png (18.7 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Kavika F avatar image
1 Like"
Kavika F answered Kavika F commented

Hey @Hao Zhou, I think I found the solution. Something that isn't clear is that you need to have the flies generated in the out/[version]/ folder in the same location as the TestFlexSimPy.py you're running. For example, if you built against Rel_3_10, then you'll go into the out/Rel_3_10/ folder and copy the files located there into the TestFlexSimPy folder.

1676392433167.png

The program should then recognize FlexSimPy (your editor may not, but that's okay. The program will still run).


1676392433167.png (2.7 KiB)
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Hao Zhou avatar image Hao Zhou commented ·
Never mind Kavika @Kavika F , I found the problem. It is caused by configuring a wrong Python version in FlexSim. Now, problem solved. Think you so much for the help!
1 Like 1 ·
Kavika F avatar image Kavika F ♦ Hao Zhou commented ·
Glad I could help! :)
0 Likes 0 ·
Hao Zhou avatar image Hao Zhou commented ·

Hello Kavika @Kavika F, thanks you so much for the reply. I did make the program compile and start running by following your instructions. However, the Python program is still not running properly. The program stuck at the following line. The Python program cannot receive anything from the FlexSim model. Could you help to provide suggestions to fix this? Thanks so much.

1676404024423.png

0 Likes 0 ·
1676404024423.png (13.2 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.