-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I am a user of the old Delphi LabRAD manager for years. Now I am trying to upgrade to the new scalabrad manager, but backward compatibility is of my highest priority. For newer users who never touched the Delphi version, these issues might not be interesting…
Since I have multiple problems, I will split them to different issues.
Test platform: Windows 7 x64, Java 8 up to date, Python 2.7, pylabrad up to date, without footprint of previous versions of LabRAD.
I need LabRAD to start its manager and point the registry to the directory where I store the old registry files. In the help, I read:
--registry uri URI giving the registry storage location. Use
labrad://[@][:][?tls=]
to connect to a running manager, or
file://[?format=] to load data
from a local file...
So I tried this, and got an error:
C:\scalabrad-0.8.3\bin>labrad --registry file://c:/labrad/registry?format=delphi
Exception in thread "main" java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.(Unknown Source)
at org.labrad.manager.Manager$.main(Manager.scala:185)
at org.labrad.manager.Manager.main(Manager.scala)
I got stuck here for several hours. I was trying different options, like path with quotation marks, ?format after a space, delphi with quotation marks, etc. (It would be great if the --help can contain an example sometimes.) Nothing worked. Until I accidentally entered a command with a typo in it:
C:\scalabrad-0.8.3\bin>labrad --registry file://;c:/labrad/registry?format=delphi
To my greatest surprise, the manager started working for the first time and went to read my old registry files!! I can't believe my eyes:
C:\scalabrad-0.8.3\bin>labrad --registry file://;c:/labrad/registry?format=delphi
23:55:23.658 [main] INFO org.labrad.manager.Manager$ - registry location: c:\labrad\registry, format=delphi
......
And then I went on to test why the typo will help start the manager. It turned out that there must be a "placeholder" character before the real path, no matter what that placeholder is, as long as it doesn't trigger other syntax errors. I can replace ";" (the typo) with other characters and start the manager all the same. So far I have tested and found these commands that work equally well:
C:\scalabrad-0.8.3\bin>labrad --registry file:///c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://;c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://:c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://.c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://,c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://+c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://-c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://*c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://(c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://)c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://=c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://_c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://$c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://!c:/labrad/registry?format=delphi
C:\scalabrad-0.8.3\bin>labrad --registry file://~c:/labrad/registry?format=delphi
And this list is very likely not complete. I know, I know... But the poor guy should be allowed to have some fun after he was stuck here for many hours and was trying desperately everything until a typo saved the world, right? :)