I have a Julia package I am developing with some notebooks I would like to let users to play with, and I am using myBinder as online computational environment.
All fine, until I replaced in the [compat] section of Project.toml the entry with Julia with multiple values:
julia_version_str = project_toml["compat"]["julia"]
# For Project.toml files, install the latest julia version that
# satisfies the given semver.
_julia_version = find_semver_match(julia_version_str, self.all_julias)
I assume the semver matcher needs to add support for comma-delimited lists of semver specs.
@sgibson91 Thank you. I already tried some commits to revert the julia dependency to a single entry (e.g. Julia=“1.3”) but I am left with the same problem… it is like somewhere it is cached ???
EDIT: Sorry, I was editing the wrong Project.toml (the one in documentation)
I can confirm that changing the julia requirement to a single entry (e.g. julia = "1.4") make mybinder working, so the problem seems the one outlined by @minrk on the find_semver_match function… could support be added to multiple julia versions ?
The error message invalid literal for int() with base 10 would seem to indicate that you are passing a string that’s not an integer to the int() function . In other words it’s either empty, or has a character in it other than a digit. You can solve this error by using Python isdigit() method to check whether the value is number or not. The returns True if all the characters are digits, otherwise False .
if val.isdigit():
The other way to overcome this issue is to wrap your code inside a Python try…except block to handle this error.
Python2.x and Python3.x
Sometimes the difference between Python2.x and Python3.x that leads to this ValueError: invalid literal for int() with base 10 . With Python2.x , int(str(3/2)) gives you “1”. With Python3.x , the same gives you (“1.5”): ValueError: invalid literal for int() with base 10: “1.5”.