renku-python icon indicating copy to clipboard operation
renku-python copied to clipboard

dataset import error when following tutorial

Open kuhlgatc opened this issue 2 years ago • 3 comments

Describe the bug

Running the line

renku dataset import --name flight-data https://www.doi.org/10.7910/DVN/WTZS4K

in the terminal results in the message "Ahhhhhhhh! You have found a bug. 🐞".

Running the line

renku dataset create flight-data --title "2019-01 US Flights"

results in the same error.

Details

I followed the Get-started- tutorial. In https://renku.readthedocs.io/en/stable/tutorials/first_steps/03_add_data.html one is advised to open Terminal and execute the above commands.

Renku version: 1.11.2 OS: Linux (#93-Ubuntu SMP Tue Sep 5 17:16:10 UTC 2023) Python: 3.10.11

Traceback

Traceback (most recent call last):
  File "[...]/renku/ui/cli/exception_handler.py", line 133, in main
    return super().main(*args, **kwargs)
  File "[...]/renku/ui/cli/exception_handler.py", line 92, in main
    return super().main(*args, **kwargs)
  File "[...]/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "[...]/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "[...]/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "[...]/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "[...]/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "[...]/renku/ui/cli/dataset.py", line 1047, in import_
    import_dataset_command().with_communicator(communicator).build().execute(
  File "[...]/renku/command/command_builder/command.py", line 223, in execute
    hook(self, context, *args, **kwargs)
  File "[...]/renku/command/command_builder/database.py", line 84, in _injection_pre_hook
    minimum_renku_version = Version(self.project.minimum_renku_version)
  File "[...]/renku/infrastructure/database.py", line 435, in setstate
    self._reader.set_ghost_state(object, data)
  File "[...]/renku/infrastructure/database.py", line 973, in set_ghost_state
    state = self._deserialize_helper(data, create=False)
  File "[...]/renku/infrastructure/database.py", line 1066, in _deserialize_helper
    data = self._deserialize_helper(data)
  File "[...]/renku/infrastructure/database.py", line 1012, in _deserialize_helper
    data[key] = self._deserialize_helper(value)
  File "[...]/renku/infrastructure/database.py", line 1027, in _deserialize_helper
    cls = self._get_class(object_type)
  File "[...]/renku/infrastructure/database.py", line 955, in _get_class
    cls = get_class(type_name)
  File "[...]/renku/infrastructure/database.py", line 112, in get_class
    return get_attribute(module, components[1:])
  File "[...]/renku/infrastructure/database.py", line 145, in get_attribute
    object = getattr(object, component)
AttributeError: module 'renku.domain_model.project' has no attribute 'ProjectTemplateMetadata'

kuhlgatc avatar Jan 22 '24 21:01 kuhlgatc

@goldenneedle Renku 1.11.2 is a very old version that is no longer supported. Does this issues still happen on newer versions of Renku?

Panaetius avatar Jan 23 '24 13:01 Panaetius

How to change the version? I am new to Renku and wanted to quickly go through the tutorial to become familiar with it. The tutorial didn't mention anything about how to adjust the version number, or have I missed something?

kuhlgatc avatar Jan 24 '24 10:01 kuhlgatc

on your local machine, update your requirements file or with something like pip install -U renku or pipx upgrade renku. on renkulab, there should be an update button on the project settings page (or just change the renku version in your dockerfile). the newest version is 2.9.1, you can verify it with renku --version

Panaetius avatar Jan 29 '24 11:01 Panaetius