TeX-Live / tlcockpit

GUI for tlmgr written in Scala
GNU General Public License v3.0
27 stars 2 forks source link

Json Parse exception thrown when there are to backups #11

Closed mojca closed 6 years ago

mojca commented 6 years ago
Exception in thread "JavaFX Application Thread" spray.json.JsonParser$ParsingException: Unexpected character 'N' at input index 0 (line 1, position 1), expected JSON Value:
No backups available in /opt/tl/2018/tlpkg/backups
^

    at spray.json.JsonParser.fail(JsonParser.scala:213)
    at spray.json.JsonParser.value(JsonParser.scala:64)
    at spray.json.JsonParser.parseJsValue(JsonParser.scala:43)
    at spray.json.JsonParser$.apply(JsonParser.scala:28)
    at spray.json.PimpedString.parseJson(package.scala:45)
    at TLCockpit.ApplicationMain$.$anonfun$load_backups_update_bkps_view$1(ApplicationMain.scala:701)
    at TLCockpit.ApplicationMain$.$anonfun$load_backups_update_bkps_view$1$adapted(ApplicationMain.scala:700)
    at TLCockpit.ApplicationMain$.$anonfun$tlmgr_run_one_cmd$2(ApplicationMain.scala:1530)
    at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
    at scalafx.application.Platform$$anon$1.run(Platform.scala:78)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
norbusan commented 6 years ago

Thanks, indeed! Will be fixed soon.

norbusan commented 6 years ago

tlmgr (so myself) is to blame, it doesn't return json even with --json. Fixed in the TL svn tlmgr.pl