'LooseVersion' object has no attribute 'version'

Hi, I have a repo that was working fine a couple of days ago but now getting this error:

Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2dockerwi4es21s'...
HEAD is now at 74c5fba Update environment.yml
Error during build: 'LooseVersion' object has no attribute 'version'

Any thoughts on what’s happening? I recognize the setup to get both RStudio and Jupyter running may be a little hacky – here is a repo where that still seems to be working; I can’t tell a difference.

Total guess based on ‘LooseVersion’ mention:

You don’t have a version specified in your environment.yml like in the conda example one here.
Of course, then the question becomes why does the one here still work? I’d guess that because you actually have install.R in that other one that it is using that build path or part of that other build route and not encountering the ‘LooseVersion’ issue? I like this one becase the documentation here says ’ Note that these two approaches cannot be combined, so you cannot install R packages via Conda and via an install.R file at the same time’. Or (less likely) maybe it is an old build still working? One way to test would be to add the Install.R from the other one that works and see what happens.

If it helps plan how to go forward, I have examples here and here that use postBuild to install the additional packages not available at conda. Be careful to keep the postBuild file working. You cannot edit that in the browser (or at least it used to break it) so it wouldn’t run as an executable. When working with postBuild I’ve found you need to use git locally to edit and push the changes.

Thank you so much for the pointers here, very interesting. Looks like I have everything I need.

1 Like