Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Jython script Error - obj has no attribute 'setIsForward'
Team, attached snip of script where the error is occurring. Funny thing is that it works fine 90% of the time.
--
Many thanks in advance! Vinny DeRobertis ~ Apex, NC New York & Hudson Valley RR Windows 7 Pro / Java 11 / JMRI v5.10 Command Station: Digikeijs DR5000. Booster: Digikeijs DR5033 (4) Samsung A7 10.4" Tablets
Fully Kiosk/Engine Driver v2.37.187
DCC/DMX Gateway: Pricom LLS. LocoNet Input Modules: Digikeijs DR4088LN DCC Output Modules: Digikeijs DR4018 / Yamorc YD8116. Sensors: Model Train Technology: DETECTOR-HO. Turnout Motors: MTB MP1 |
Vinny, You are not checking to see if the throttle is valid. if self.throttle is not None: ? ? self.throttle.setIsForward(True) else: ? ? print 'Unable to get throttle for {}'.format(TrainsBreakInLocoIDNum) ? ? # do whatever to handle the error Dave Sand ----- Original message ----- From: "Vinny DeRobertis via groups.io" <vinny.derobertis=[email protected]> Subject: [jmriusers] Jython script Error - obj has no attribute 'setIsForward' Date: Friday, April 11, 2025 2:05 PM Team, attached snip of script where the error is occurring. Funny thing is that it works fine 90% of the time. -- Many thanks in advance! Vinny DeRobertis ~ Apex, NC New York & Hudson Valley RR Windows 7 Pro / Java 11 / JMRI v5.10 Command Station: Digikeijs DR5000. Booster: Digikeijs DR5033 (4) Samsung A7 10.4" Tablets Fully Kiosk/Engine Driver v2.37.187 DCC/DMX Gateway: Pricom LLS. LocoNet Input Modules: Digikeijs DR4088LN DCC Output Modules: Digikeijs DR4018 / Yamorc YD8116. Sensors: Model Train Technology: DETECTOR-HO. Turnout Motors: MTB MP1 Attachments:
|
to navigate to use esc to dismiss