diff --git a/snakedeploy/conda.py b/snakedeploy/conda.py index 96b044a..8f7e26a 100644 --- a/snakedeploy/conda.py +++ b/snakedeploy/conda.py @@ -194,7 +194,12 @@ def get_pkg_versions(conda_env_path): def downgraded(): for pkg_name, version in posterior_pkg_versions.items(): - version = packaging_version.parse(version) + try: + version = packaging_version.parse(version) + except packaging_version.InvalidVersion as e: + raise UserError( + f"Cannot parse version {version} of package {pkg_name}: {e}" + ) prior_version = prior_pkg_versions.get(pkg_name) if prior_version is not None and version < packaging_version.parse( prior_version @@ -297,6 +302,9 @@ def add_file(self, filepath, content, is_updated, msg): @retry(tries=2, delay=60) def create(self): + import pdb + + pdb.set_trace() if not self.files: logger.info("No files to commit.") return