tferr / Scripts

:microscope::cocktail: Home of the ImageJ BAR: A collection of Broadly Applicable Routines for ImageJ
https://imagej.net/BAR
GNU General Public License v3.0
24 stars 18 forks source link

BAR update gives unexpected filesize for Extract_Bouts_From_Tracks.py #21

Closed glynnelson closed 7 years ago

glynnelson commented 7 years ago

Adding BAR site in Fiji on a Mac I was unable to install fully, as it gave the following error:

Incorrect file size for /Applications/Fiji.app/update/plugins/Scripts/BAR/Snippets/Extract_Bouts_From_Tracks.py: 17534 (expected 18471)

imagejan commented 7 years ago

It's possible that the file was corrupted during download. The latest source file on the update site (http://sites.imagej.net/Tiago/plugins/Scripts/BAR/Snippets/) does have the correct size of 18471 bytes. Can you try updating again?

tferr commented 7 years ago

@imagejan thanks for looking into it!

It took me a while to reproduce this, but I finally manage to reproduce it:

  1. Download Fiji from http://downloads.imagej.net/fiji/latest/
  2. Run the Updater. Restart
  3. Run the Updater. Subscribe to the BAR Update site.
  4. The following exception is triggered:
java.lang.RuntimeException: Incorrect file size for /Applications/IJ/Fiji-Virgin.app/update/plugins/Scripts/BAR/Snippets/Extract_Bouts_From_Tracks.py: 17534 (expected 18471)
    at net.imagej.updater.Installer.verify(Installer.java:293)
    at net.imagej.updater.Installer$VerifyFiles.itemDone(Installer.java:270)
    at net.imagej.updater.util.AbstractProgressable.itemDone(AbstractProgressable.java:87)
    at net.imagej.updater.util.Downloader.download(Downloader.java:138)
    at net.imagej.updater.util.Downloader.start(Downloader.java:98)
    at net.imagej.updater.Installer.start(Installer.java:154)
    at net.imagej.ui.swing.updater.UpdaterFrame.install(UpdaterFrame.java:629)
    at net.imagej.ui.swing.updater.UpdaterFrame$13.run(UpdaterFrame.java:566)

I am not so sure what is really causing it, but for now the following seems to work: After the error is displayed, just select the problematic file in the updater, and select the Keep as-is action (screenshot below). After restart the file seems to appear properly installed and the updater no longer complains about it. @glynnelson, does it work for you?

Otherwise, I guess I could upload a newer version of the file, to see if the problem goes away.

bar-updateexceptipn

glynnelson commented 7 years ago

I was pretty sure it wasn't the download as I tried it several times. However, you are correct @tferr , it works fine if I restart and gives no errors.

Thanks!

imagejan commented 7 years ago

In fact, it might also be an inconsistent state of the db.xml.gz file on the update site (containing the status information of all the files). My Fiji installation reports the script file as being up-to-date, but from 14 June 2016:

image

while the latest version present on the site has a time stamp from November:

Extract_Bouts_From_Tracks.py-20161124120033

I have no clue how this could have happened, maybe @ctrueden has an idea.

glynnelson commented 7 years ago

That would make sense, as on the multiple times I tried, it was always the same sizes expected and downloaded.

ctrueden commented 7 years ago

@tferr I did some surgery on the Tiago update site's db.xml.gz. I fixed the file size there to match reality on the file system. Hopefully this makes the error go away. Please double check that the actual script contents are correct.

ctrueden commented 7 years ago

Actually, my surgery was wrong. We need a new checksum for the newer 20161124120033 version. The file size is correct for that version. Working on it.

ctrueden commented 7 years ago

I changed the checksum to the correct value, and all seems OK now. Please comment here if not. Otherwise, I think this issue can be closed.

P.S. Regarding why this happened... unfortunately, I have no idea. But I propose that we wait to see whether it happens again before we worry about it too much.

tferr commented 7 years ago

@ctrueden Thanks for looking into it. I guess this is yet one more reason to have all scripts bundled in a single jar file. Hopefully Lisbon is treating you well. And I do hope you have time to visit Porto. It is my hometown!