robofont-mechanic / Mechanic

Package manager for RoboFont extensions
http://robofontmechanic.com
MIT License
26 stars 7 forks source link

Crash trying to register an extension #9

Closed jenskutilek closed 9 years ago

jenskutilek commented 9 years ago

I have moved an extension to a new repository and try to register it again in Mechanic:

Traceback (most recent call last):
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaBase.py", line 196, in action_
    self.callback(sender)
  File "/Users/jens/Downloads/Mechanic-master/Mechanic.roboFontExt/lib/mechanic/ui/tabs/register.py", line 73, in register
    errors = response.json()['error']
UnboundLocalError: local variable 'response' referenced before assignment
Traceback (most recent call last):
  File "lib/doodleDelegate.pyc", line 157, in sendEvent_
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaBase.py", line 196, in action_
    self.callback(sender)
  File "/Users/jens/Downloads/Mechanic-master/Mechanic.roboFontExt/lib/mechanic/ui/tabs/register.py", line 73, in register
    errors = response.json()['error']
UnboundLocalError: local variable 'response' referenced before assignment
jackjennings commented 9 years ago

Can you email me the extension to test locally? j@ckjennin.gs

jenskutilek commented 9 years ago

It's https://github.com/jenskutilek/Curve-Equalizer .

jackjennings commented 9 years ago

Ahh, you're trying to move an extension from one repository to another. There's not a great way to do this right now without some additional tinkering on the registry server. (The error above still needs to be captured correctly.)

I can update the repository location on the server, and post a tweet alerting people to reinstall if that's ok with you.

jenskutilek commented 9 years ago

That would be great, thanks!

jackjennings commented 9 years ago

The only way to get a really seemless transition right now is to increment the version in the old repository and update the repository key to point to the new location, then increment the version one level higher than that in the new repository so that it will be pulled in the next update. Such that (e.g.):

Repo: Curve-Equalizer in https://github.com/jenskutilek/Robofont Version: 0.7.3 Repo Key: jenskutilek/Curve-Equalizer

Repo: Curve-Equalizer in https://github.com/jenskutilek/Robofont Version: 0.7.4 Repo Key: jenskutilek/Curve-Equalizer

That's not required, but users that don't manually re-install may get stuck with the old branch if not. Given that a lot of people will see the tweet, you may not want to bother.

I'm planning on changing the way this works in the next major version of Mechanic since I've had requests about this in the past as well.

jackjennings commented 9 years ago

Also, let me know if you plan to do the same for UFO Cleaner and I'll do both in the same tweet.

jackjennings commented 9 years ago

Should report the correct errors now: "Name already taken", etc.

jenskutilek commented 9 years ago

The only way to get a really seemless transition right now is to increment the version in the old repository and update the repository key to point to the new location, then increment the version one level higher than that in the new repository so that it will be pulled in the next update.

I seem to have done just that in October, so people who updated their Curve Equalizer should be already on the new repo.

My other repos will stay like they are for the time being.

Thanks again!