robofont-mechanic / Mechanic

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

Error while trying to register an extension #8

Closed jenskutilek closed 9 years ago

jenskutilek commented 9 years ago

As soon as I start Mechanic with the "Register" tab, I get this in the output window:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "threading.pyc", line 808, in __bootstrap_inner
  File "threading.pyc", line 761, in run
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/mechanic/ui/windows/notification.py", line 20, in __init__
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/mechanic/ui/windows/notification.py", line 74, in get_updates
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/mechanic/update.py", line 25, in all
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/mechanic/update.py", line 39, in _fetch_updates
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/mechanic/extension.py", line 66, in should_update
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/mechanic/extension.py", line 58, in is_current_version
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/mechanic/extension.py", line 91, in version
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/mechanic/version.py", line 20, in __init__
  File "/Users/jens/Library/Application Support/RoboFont/plugins/Mechanic.roboFontExt/lib/site-packages/semversion.py", line 92, in __init__
VersionError: invalid version '2.0b2'```
jenskutilek commented 9 years ago

Actually, I don't need to do anything, the crash occurs when Mechanic is only installed, no interaction required.

jackjennings commented 9 years ago

Do you know which extension has the version 2.0b2?

jenskutilek commented 9 years ago

Ah, okay, it's an extension that is not in a public repository. It had a repository key for mechanic anyway. When I remove it, everything's fine.

jackjennings commented 9 years ago

I'm going to keep this open, so that I can do something in regards to capturing this error before it raises.

If you do want to use a beta flag on the version, you should be able to do so as long as it conforms to the semantic versioning spec: http://semver.org

jackjennings commented 9 years ago

E.g. 1.0.0-beta. You might have to also include the patch level version as well?

jenskutilek commented 9 years ago

Thanks!

jackjennings commented 9 years ago

I've added a try/catch and a warning describing acceptable version numbers. Thanks or submitting the bug!