Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

AttributeError: module 'motion' has no attribute 'attach_obj'

AttributeError: module 'motion' has no attribute 'attach_obj'

Luschuerz
Long-established Member

I was trying to run a program created in TIGER (Visual Coding) in the textual coding part of the IDE. In order to do that I simply tried to run the script created in TIGER within the textual coding environment. 

The script works fine in the TIGER environment. However I get an error as in the title upon execution of the script.

 

The full traceback is as follows:

"# cd '/var/snap/rexroth-ide/common/solutions/activeConfiguration' && env '/usr/bin/python3' '/var/snap/rexroth-ide/common/plugins/vscode-python/extension/pythonFiles/lib/python/debugpy/launcher' '46181' '--' '/var/snap/rexroth-ide/common/solutions/activeConfiguration/scripts/bosch/tiger/42922355-dd61-47c4-b180-c5e1dc3b1134.py'
System architecture: x86_64
Traceback (most recent call last):
File "/var/snap/rexroth-ide/common/solutions/activeConfiguration/scripts/bosch/tiger/42922355-dd61-47c4-b180-c5e1dc3b1134.py", line 1375, in <module>
class motion:
File "/var/snap/rexroth-ide/common/solutions/activeConfiguration/scripts/bosch/tiger/42922355-dd61-47c4-b180-c5e1dc3b1134.py", line 1376, in motion
Axis_1 = motion.factory.create_axis("""Axis_1""",
File "/var/snap/rexroth-ide/common/solutions/activeConfiguration/scripts/bosch/tiger/42922355-dd61-47c4-b180-c5e1dc3b1134.py", line 1251, in create_axis
MotionLib.attach_obj(name)
AttributeError: module 'motion' has no attribute 'attach_obj'
# "

 

Do I need to do an extra configuration in the textual coding in order to run scripts from the visual coding side?

Thank you

2 REPLIES 2

CodeShepherd
Community Moderator
Community Moderator

Could you please tell us the version of the ctrlX CORE - Motion,  - IDE and - Python Runtime app you are using?

Please keep in mind that there are two ways of running a script. Like I mentioned in this post. The script created by the graphical programming is made for the usage on a ctrlX CORE in our python runtime. So the python interpreter running in your browser does probably not have the necessary sources to interpret the script. You will have to choose the option run in script interpreter for this case. Just tested this scenario again.

IDE textual editor script launch settingIDE textual editor script launch setting

Luschuerz
Long-established Member

I was using 1.18 vor both CORE and the motion/IDE apps.

 

It was the selection of the runtime that was the issue. It works just fine now after selecting the Script engine.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist