Closing a CSV file within script
3
I have a script which reads a CSV file created within Excel to automate my layout. Each row in the file describes a section in the layout such as blocks, sensors, turnouts, turnout state, signal etc. Path to the file is self.routeSelFile = (self.retval+"/Routes/Live/"+self.filename) - I run this on two PCs (not concurrently) and self.retval is the path for a specific PC, self.filename is the route selection from a drop-down. File is opened with self.sens_file = open(self.routeSelFile, "r") And closed when the script terminates with self.sens_file.close() There are other clean up routines called when the script terminates with status messages so I am confident the close() is being performed. The script works fine (although lots of functionality still in development) and I run an instance (if that's the correct word) of the script to control each loco. When open a CSV file using Excel due to a typo or modification if that file has been previously opened by a script Excel will not allow me to save the updated CSV file with the same name, it states that someone else is using the file and offers to save a copy or cancel. It does not come up with the usual Excel message of "open in read only" when I open the file or any other warning, only when I try to save it. This is the case even if I just run one instance of the script and then terminate it properly. There is no error message in the console. I can save the CSV file with the same name and no error if I quit PanelPro I wonder if there is something that I should also be doing in Windows to reset a flag or something else? Any advice welcome, thanks Pete PanelPro 5.8+Rbc21ce2ce Java 11.0.13 Windows 10 Pro 64 Excel 2019
|
Blocks not showing up in Logix
5
I should probably stick with one problem at a time, but I decided to tackle another one toinight. I want to setup my turnouts so that if the block they are in is occupied that the turnout that cannot be thrown. Is Logix the best way to do this? Logix is how I am trying to do it. I think I have the action set correctly, but I am having an issue with the trigger. My thought was to use the block occupancy to set whether the turnout is locked or not. But I have created a block and it is not showing up in Logix. I could use the sensor that is determining block occupancy, but I am curious if this is the correct way to do this? I would think block occupancy would be the logical method. What am I doing wrong? I am hoping this single screenshot shows everything that needs to be seen to determine what I am doing wrong. -- Heath @ Human[c]ity http://www.humancity.org http://www.riversidetransfer.nyc http://www.manhattanmodelers.com
|
JMRI file structure clarifications
6
All - Doing a little housecleaning and reorg of multiple computer instances of JMRI.. Due to not fully understanding the internal file structure, I'm looking for a little education to make sure I don't mess things up. Current configuration: - Main JMRI instance running on train room Windows computer connected to layout. User files are in JMRI folder on Dropbox. - Development JMRI instance running on a separate Windows computer in simulation mode. User files are in a separate JMRIDev folder on Dropbox Current workflow is to modify and test JMRI development instance in with user files in JMRIDev folder then move final changes to JMRI folder. I've spent some time reviewing info on JMRI website and have the following questions: Per the JMRI website "JMRI Profile Directory Tutorial", each instance of JMRI loaded on a separate computer generates a file called nodeIdentity.xml which contains a unique nodeIdentity string in the" Settings Location" that doesn't change. I found this file in the JMRI program directory of each computer with different nodeIdentity strings on each computer. For example, the file on the development computer contains the following: <nodeIdentityConfig><nodeIdentity nodeIdentity="jmri-E89C255E273F" /><storageIdentity storageIdentity="3f2eb549-261f-427c-91ae-bcdc75fc9064" /><uuid uuid="d6TSuJLhZj6jgTUnW-9jbJ" /><formerIdentities><nodeIdentity nodeIdentity="jmri-040E3C10335F" /><nodeIdentity nodeIdentity="jmri-d6TSuJLhZj6jgTUnW-9jbJ" /><nodeIdentity nodeIdentity="jmri-E89C255E273F" /><nodeIdentity nodeIdentity="jmri-0A002700000F" /><nodeIdentity nodeIdentity="jmri-0A002700000D" /><nodeIdentity nodeIdentity="3f2eb549-261f-427c-91ae-bcdc75fc9064" /></formerIdentities></nodeIdentityConfig> In the list of <formerIdentites> is a former node identity that equals the current <storageIdentity>. -- Is this a coincidence or does this match have significance? -- What's the difference between a <nodeidentity> and a <storageIdentity> -- Are the <formerIdentities> still relevant? In the JMRIDev user files folder on Dropbox, I found the profile subfolder which contains the profile.xml / profile.properties files AND a separate subfolder named the same as the <storageIdentity> listed in the nodeIdentity.xml file string above. Inside this separate subfolder, I found another copy of profile.xml and profile.properties along with a file named user-interface.xml. The timestamp on the first two files are the same as the ones in the profile parent directory . Now the confusion... -- Why are these files in both places? -- If I wanted to copy the updated profile files on the development computer to the Main layout computer, do I copy the files to both places (the profile subdirectory and the separate subfolder named the same as the <storageIdentity> listed in the nodeIdentity.xml on the Main layout computer? I understand the situation with other user files (the panel files rosters files...etc), but a little confused on how to copy the profiles. A little guidance would be appreciated. thx Norb Windows 11 PC, JMRI 5.10, java 17.0.11 (64bit) NCE SB5 system
|
Through Freight with Yard Work
3
On Thu, May 8, 2025 at 11:33 PM, Bill Rutherford wrote: Man I wish there was a delete key. There is, under "More" you can delete a message that you've created. Dan
|
OperationsPro Manifest: car number always limited to 6 characters
6
#operationspro
Hello, Windows 11 JMRI version 5.11.4+R87a9dadc80 Java version 11.0.15 For some reason in the last while, when previewing a manifest, the car number only displays 6 characters, even though some of the cars have numbers greater than 6 characters. In the manifest text file the car number shows all digits, so it's definitely a problem with the preview. I have noticed the headers for "Type" and "Length" are also truncated. I don't think I have changed anything, so I am not sure when this started happening. I have attached screenshots of the manifest text file, print preview, and the "Edit Manifest Header Text" window. Any ideas? Thank you for your help. -- Tom
|
New to DCC - MacBook Pro Java failure
9
#java
#mac-os
I have a 2011 MacBook Pro running OS 10.13. I just bought a Digitrax Evolution Xpresss starter set. I downloaded and successfully installed JMRI and Java 11. DecoderPro won¡¯t open because Java 11 needs to be installed. IT IS INSTALLED. Yes, I turned it off and back on again. I clicked on See More on the popup window and I get instructions for downloading Java 17. I downloaded and successfully installed Java 17. DecoderPro won¡¯t open because Java 11 needs to be installed. The Java 11 and Java 17 installations both installed successfully. What gives? Tracy Reynolds
|
NCE ProCab- Light-it as signal decoder - Simultaneous commands
54
#nce
Query from a Nimble Newbie, How many commands can one send at a time from an "if-then" Logix statement? E.g. IF sensor 'x' goes 'active' THEN....switch Signal '1' to danger, signal '2' to caution, signal 3 to 'clear', turn on coffee pot, etc... It seems to THEN part of the statement fires odd the commands so quickly that the NCE system misses some of the actions [somewhat randomly]. Not a wiring issue. Is there a way of slowing down, or at least separating out [even by milliseconds] the list of ACTIONS to occur upon a given antecedent? Nimble of Oz
|
Staging - First in, First out
3
#operationspro
Is staging automatically First in, First Out? I have a long staging track which is made up of two tracks pooled together with the ability to park one train behind another. If the track has two trains in it and I build a train leaving that pooled track in staging will JMRI automatically send out the first train (front train)? If not how would I set that up to happen?
|
Coding with Packet Analyzer
10
Anyone up for a job? How much would you charge to make me code? To parse the data coming from the packet analyzer and update the locomotive roster with new running time. Maybe make some stats out of the data coming back....
|
Hardware
4
Does anyone know of any hardware that is currently for sale that could be used to control room lighting? All the supported hardware seems to be discontinued on Powerline website. Thank you, Bob
|
Layout Editor bug in Dark Mode
3
Folks, I discovered an interesting bug when using "Dark Mode". I have attached the system console output when attempting to change the scaling of an icon using Panel Pro v5.11.5 with dark mode enabled. Using 5.11.5 with "classic windows" enabled, scaling works normally. Thanks, Tom Kane Purcellville, VA -- Tom Kane Purcellville, VA Modelling the PRR in 1954 'ish'
|
MR SLAM Formatter version 3.01 is now available for download
#MRSLAMFormatter
#operationspro
Unfortunately a couple of gremlins snuck into my code during the development of version 3.00. These caused some issues with the color of car lines and line wrapping within a cell when it wasn¡¯t necessary. I¡¯ve resolved those 2 issues in the 3.01 version. In addition I added a new feature requested by a user that allows the user to insert blank lines between types of car lines and loco and car lines to help in reading the report. Visit the website to download the new version. Tim
|
Roster Missing
7
Was using JMRI to program some locos when the computer suddenly decided to do some update. Closed JMRI and waited for the update conclusion. Then reloaded JMRI and discovered that the roster file was gone. Absolutely empty. Did a couple of reloads, same problem. I am hoping that the file is still in the computer, but the link to load it vanished. Is there a specific name for the roster file that I can reload if it is indeed there? Any suggestions or ideas greatly welcome. Roger Thomas Note: This is a club roster with over 300 locos.
|
DP timing out talking to Command Station
7
Hi folks- I¡¯ve been a group member for quite some time, but very inactive for almost as long¡at least a decade. I was installing some decoders the other day and ran into some hiccups and realized it was time to connect JMRI/Decoder Pro to my test track (layout under construction). I was planning to use my old iMac (from 2011 running OS 10.13.6) but it wouldn¡¯t start up¡so I just got a newer iMac just for the layout - 24¡± M1 from 2021. I just installed OS 15.4.1, DP 5.10. and Java from Azul (zulu11.80.21¡dmg). My test track uses a DCS50 (Zephyr) and Soundtraxx PTB-100 (booster). I¡¯ve also got the test track wired so that it is either the main or programming track (DPDT switch to select the output from the Zephyr). The Serial interface is a LocoBuffer-USB (v2.03). DP starts and appears to run OK, except that in trying to read from the decoder to set up a new loco I get timeouts (See first image). I¡¯ve tried each of the 6 different port options (second image) in both Programming Track and Programming on the main options - all with the same timeout. I thought the issue might be the LB-USB, but the green LEDs are on and on the DP window at the bottom it says LocoNet is online. I also tested the cable I¡¯m using to connect the LB-USB to the Zephyr and it is good. So I¡¯m stumped. Any thoughts on why the connection is timing out? -alex- Alex M. Postpischil Winston-Salem, NC
|
Startup Gets Stuck
16
#startup
Recently it became necessary to reinstall Java and JMRI. First, I checked that both programs were uninstalled. I then installed Java Version 8 Update 441 and JMRI Version 4.26+R381. Both were problem free installs. I then tried to start JMRI so I could load my roster. The Java icon and the DecoderPro icon appeared in the taskbar and the small JMRI splash screen appeared in the middle of my screen. That's as far as the startup got. I've listed my equipment below. What am I missing? I'd appreciate any help in getting started. -- Richard Richter Dell Lattude 3190 2-in-1 Laptop Computer Microsoft Windows 11 Pro RR-CirKits LocoBuffer-NG Rev-a Digitrax ZephyrXtra DCS 51 Command Station
|
Problem with DCS210+ connecting to Win10
5
I am a former Lenz user that just changed to Digitrax (changed RR club). I have the following: - win10 laptop - 5.10 decoderpro - AZUL ZULU JDK 17.56.15(17.0.14) 64 bit - DCS210+ USB connected on comm7 - Loconet server is running on port 1234 My issue is it starts reading decoder and returns error 306. Here is the system console info: 09:05:45,729 apps.util.Log4JUtil INFO - * JMRI log ** [main] 09:05:45,760 apps.util.Log4JUtil INFO - This log is stored in file: C:\Users\user\JMRI\log\session.log [main] 09:05:45,760 apps.util.Log4JUtil INFO - This log is appended to file: C:\Users\user\JMRI\log\messages.log [main] 09:05:45,823 apps.AppsBase INFO - DecoderPro version 5.10+Rca461bd266 starts under Java 17.0.14 on Windows 10 amd64 v10.0 at Thu May 01 09:05:45 CST 2025 [main] 09:05:46,072 apps.gui3.Apps3 INFO - Starting with profile My_JMRI_Railroad.3ed69ac3 [main] 09:05:46,291 jmri.util.node.NodeIdentity INFO - Using c0f73803-0a28-4143-a5d4-ce6ead45f1e7 as the JMRI storage identity for profile id 3ed69ac3 [AWT-EventQueue-0] 09:05:46,518 xml.AbstractSerialConnectionConfigXml INFO - Starting to connect for "LocoNet" [main] 09:05:46,747 t.usb_dcs210Plus.UsbDcs210PlusAdapter INFO - Connecting USB DCS210Plus via COM7 PCI Serial Port [main] 09:05:46,747 .loconet.locobuffer.LocoBufferAdapter INFO - LocoNet: Port Intel(R) Active Management Technology - SOL (COM7) opened at 57600 baud, sees DTR: true RTS: true DSR: true CTS: true DCD: true flow: RTSCTS [main] 09:05:46,762 x.loconet.pr3.PR3SystemConnectionMemo INFO - Connection [L] initialized as LocoNet interface, allows access to attached devices. (see preferences) [main] 09:05:46,897 jmri.jmrix.loconet.LnPacketizer INFO - lnPacketizer Started [main] 09:05:47,552 jmri.jmrit.roster.Roster INFO - Reading roster file with rootFromName(C:\Users\user\JMRI\My_JMRI_Railroad.jmri\roster.xml) [main] 09:06:04,755 ix.loconet.loconetovertcp.LnTcpServer INFO - Starting new LocoNetOverTcpServer listener on port 1234 [AWT-EventQueue-0] 09:06:04,758 ix.loconet.loconetovertcp.LnTcpServer INFO - Starting ZeroConfService _loconetovertcpserver._tcp.local for LocoNetOverTCP Server [AWT-EventQueue-0] 09:06:04,984 jmri.jmrit.withrottle.FacelessServer INFO - Published ZeroConf service for 'south sask railroad._withrottle._tcp.local.' on 192.168.0.28:12090 [WiThrottleServer] 09:06:04,986 jmri.jmrit.withrottle.FacelessServer INFO - Published ZeroConf service for 'south sask railroad._withrottle._tcp.local.' on fe80:0:0:0:e862:7f07:81ec:d531%wlan1:12090 [WiThrottleServer] 09:06:04,988 jmri.jmrit.withrottle.FacelessServer INFO - Published ZeroConf service for 'south sask railroad._withrottle._tcp.local.' on fe80:0:0:0:5414:27df:8a51:7473%net11:12090 [WiThrottleServer] 09:06:04,991 jmri.jmrit.withrottle.FacelessServer INFO - Published ZeroConf service for 'south sask railroad._withrottle._tcp.local.' on 10.0.6.125:12090 [WiThrottleServer] 09:06:04,994 jmri.jmrit.withrottle.FacelessServer INFO - Creating new WiThrottle DeviceServer(socket) on port 12090, waiting for incoming connection... [WiThrottleServer] 09:06:05,020 jmri.util.FileUtilSupport INFO - File path program: is C:\Program Files (x86)\JMRI\ [main] 09:06:05,020 jmri.util.FileUtilSupport INFO - File path preference: is C:\Users\user\JMRI\My_JMRI_Railroad.jmri\ [main] 09:06:05,021 jmri.util.FileUtilSupport INFO - File path profile: is C:\Users\user\JMRI\My_JMRI_Railroad.jmri\ [main] 09:06:05,022 jmri.util.FileUtilSupport INFO - File path settings: is C:\Users\user\JMRI\ [main] 09:06:05,022 jmri.util.FileUtilSupport INFO - File path home: is C:\Users\user\ [main] 09:06:05,023 jmri.util.FileUtilSupport INFO - File path scripts: is C:\Program Files (x86)\JMRI\jython\ [main] 09:06:05,629 t.permission.DefaultPermissionManager INFO - Permission file: C:\Users\user\JMRI\.permissions.xml [main] 09:06:05,634 t.permission.DefaultPermissionManager INFO - Permission system is enabled: no [main] Here is the preferences screen shot: I searched older records and could not find relevant info. Any suggestions welcomed Thanks Greg King
|
Locked
File /ProblemsBeingWorkedOn/dsand/3way LogixNG.xml uploaded
#file-notice
The following items have been added to the Files area of the [email protected] group. /ProblemsBeingWorkedOn/dsand/3way LogixNG.xml By: Dave Sand <ds@...> Description: LogixNG example to sequence the switch machines in a 3-way turnout to prevent physical conflicts.
|
Peco 3 way points
7
I'm new to JMRI, and have been charged with re-wiring a layout and making it work. I've managed to draw the layout in PanelPro and assign turnout numbers, and get crossovers working, but that is as far as I've got. There are about 6 peco 3 way turnouts, I've drawn each of them as 2 separate sequential turnouts, but they cannot work like that. They need special treatment, which is currently beyond me. The 2 pairs of point blades are very close together such that the blades need to be set to the mid straight route before being set left or right. Some are also parts of crossovers just to make things more interesting. What is the simplest way to do this ? Mike Johnson
|
JMRI won't pickup cars with trains
8
#operationspro
I can't get jmri to pick up cars with my train. first time user. Java 17 version 5.1 Screen shots Craig Drenkow 1306 Parkview Dr. Norfolk, NE 68701 402-649-5498
|
Locked
Xnet Message queue not being send to layout
15
#lenz
#xpressnet
Hi there, I am experiencing an issue with JMRI, I am using the latest 5.10 production release. I experienced similar issue with the previous version. I am using a Lenz LVZ100 command station with a serial interface on a raspberry pi. Everything works as expected, but after a while, the queue for a DCC address stops being treated. I mainly run my trains through custom jython scripts. The only workaround I found is to restart JMRI. When this happens any JMRI tool is useless for a specific address (withrottle, jmri throttle, web throttle...), but that address can still be controlled with handheld command outside JMRI. I enabled trace log level and here is what I get. In this example address 2 is stuck while address 9 works fine at the same time. Not processing queue : 18:31:08,106 jmri.jmrix.lenz.XNetThrottle DEBUG - set Speed to: 0.09 Current step mode is: 28 SS [Speeder : TGV V150 (DCC 2)] 18:31:08,107 jmri.jmrix.lenz.XNetThrottle DEBUG - adding message to message queue [Speeder : TGV V150 (DCC 2)] 18:31:08,608 jmri.jmrix.lenz.XNetThrottle DEBUG - set Speed to: 0.0 Current step mode is: 28 SS [Speeder : TGV V150 (DCC 2)] 18:31:08,608 jmri.jmrix.lenz.XNetThrottle DEBUG - adding message to message queue [Speeder : TGV V150 (DCC 2)] Processing queue (same session) : 18:31:33,841 jmri.jmrix.lenz.XNetThrottle DEBUG - set Speed to: 0.03 Current step mode is: 28 SS [Speeder : TGV Poste (DCC 9)] 18:31:33,842 jmri.jmrix.lenz.XNetThrottle DEBUG - adding message to message queue [Speeder : TGV Poste (DCC 9)] 18:31:33,842 jmri.jmrix.lenz.XNetThrottle DEBUG - sending message to traffic controller [Speeder : TGV Poste (DCC 9)] 18:31:34,083 jmri.jmrix.lenz.XNetThrottle DEBUG - Throttle 9 - received message 01 04 05 [AWT-EventQueue-0] 18:31:34,085 jmri.jmrix.lenz.XNetThrottle DEBUG - Status Timer Stopped [AWT-EventQueue-0] 18:31:34,085 jmri.jmrix.lenz.XNetThrottle DEBUG - message queue empty [AWT-EventQueue-0] 18:31:34,343 jmri.jmrix.lenz.XNetThrottle DEBUG - set Speed to: 0.06 Current step mode is: 28 SS [Speeder : TGV Poste (DCC 9)] 18:31:34,343 jmri.jmrix.lenz.XNetThrottle DEBUG - adding message to message queue [Speeder : TGV Poste (DCC 9)] 18:31:34,343 jmri.jmrix.lenz.XNetThrottle DEBUG - sending message to traffic controller [Speeder : TGV Poste (DCC 9)] 18:31:34,626 jmri.jmrix.lenz.XNetThrottle DEBUG - Throttle 9 - received message 01 04 05 [AWT-EventQueue-0] 18:31:34,627 jmri.jmrix.lenz.XNetThrottle DEBUG - Status Timer Stopped [AWT-EventQueue-0] 18:31:34,627 jmri.jmrix.lenz.XNetThrottle DEBUG - message queue empty [AWT-EventQueue-0] Any ideas greatly appreciated. Adrien
|