Project

General

Profile

Bug #119

User Manual: Hydrilla Requires Python 3.9, not 3.7

Added by jacobk over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
-
Start date:
06/03/2022
Due date:
% Done:

100%

Estimated time:

Description

The user manual for Hydrilla says that "Hydrilla requires Python interpreter in at least version 3.7", but when I tried to run Hydrilla using Python 3.8, I got an error:

jacobk@jacobk-K55A:~/Programs/Haketilo/scripts/staging/Anbox$ hydrilla-builder -s . -d build/
Traceback (most recent call last):
  File "/home/jacobk/.local/bin/hydrilla-builder", line 8, in <module>
    sys.exit(perform())
  File "/home/jacobk/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/jacobk/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/jacobk/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jacobk/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/jacobk/.local/lib/python3.8/site-packages/hydrilla/builder/build.py", line 412, in perform
    build = Build(Path(srcdir), Path(index_json))
  File "/home/jacobk/.local/lib/python3.8/site-packages/hydrilla/builder/build.py", line 184, in __init__
    self._process_index_json(index_obj)
  File "/home/jacobk/.local/lib/python3.8/site-packages/hydrilla/builder/build.py", line 326, in _process_index_json
    [self._process_file(f['file']) for f in index_obj['copyright']]
  File "/home/jacobk/.local/lib/python3.8/site-packages/hydrilla/builder/build.py", line 326, in <listcomp>
    [self._process_file(f['file']) for f in index_obj['copyright']]
  File "/home/jacobk/.local/lib/python3.8/site-packages/hydrilla/builder/build.py", line 206, in _process_file
    if not path.is_relative_to(self.srcdir):
AttributeError: 'PosixPath' object has no attribute 'is_relative_to'

I found this page (https://www.freecodecamp.org/news/how-to-use-pathlib-module-in-python/) that says "Some methods like .with_stem(), and .is_relative_to() have been added recently to Python 3.9 and above. So, if you call these methods using Python 3.8 or lower, an attribute error is raised.".

I installed python3.9 with guix and then re-installed Hydrilla using python3.9, and then it worked fine. So, is the user manual just outdated? Or did I do something wrong that only affects python3.8 for some reason?

History

#1

Updated by koszko over 1 year ago

It's a bug. My overlooking (I should've tested every release). I'll make a patch to fix this

#2

Updated by koszko about 1 year ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

This has been fixed for some time in the latest Hydrilla pre-release:

https://hydrillabugs.koszko.org/news/12

Also available in: Atom PDF