blaisep / private_facts

GNU General Public License v3.0
0 stars 1 forks source link

Trouble installing Tahoe-LAFS #9

Closed Rodrigoplp closed 3 weeks ago

Rodrigoplp commented 3 weeks ago

After installing Tahoe-LAFS with uv add tahoe-lafs and running .venv/bin/tahoe --version, the following error occurs:

/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/foolscap/logging/gatherer.py:522: SyntaxWarning: invalid escape sequence '\w'
  INCIDENT_GATHERER_TACFILE = """\
/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/interfaces.py:420: SyntaxWarning: invalid escape sequence '\-'
  """This block of data contains integrity-checking information (hashes
/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/util/i2p_provider.py:192: SyntaxWarning: invalid escape sequence '\:'
  escaped_sam_port = sam_port.replace(':', '\:')
/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/node.py:93: SyntaxWarning: invalid escape sequence '\.'
  ADDR_RE = re.compile("^([1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]*)(:([1-9][0-9]*))?$")
/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/hashtree.py:82: SyntaxWarning: invalid escape sequence '\ '
  """
/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/hashtree.py:191: SyntaxWarning: invalid escape sequence '\ '
  """
Traceback (most recent call last):
  File "/home/.../PrivateFacts/.venv/bin/tahoe", line 5, in <module>
    from allmydata.scripts.runner import run
  File "/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/scripts/runner.py", line 10, in <module>
    from allmydata.scripts import debug, create_node, cli, \
  File "/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/scripts/admin.py", line 28, in <module>
    from allmydata.client import read_config
  File "/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/client.py", line 37, in <module>
    from allmydata.immutable.upload import Uploader
  File "/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/immutable/upload.py", line 32, in <module>
    from allmydata.immutable import encode
  File "/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/immutable/encode.py", line 29, in <module>
    from ..util.eliotutil import (
  File "/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/allmydata/util/eliotutil.py", line 35, in <module>
    from attr.validators import (
ImportError: cannot import name 'provides' from 'attr.validators' (/home/.../PrivateFacts/.venv/lib/python3.12/site-packages/attr/validators.py)

This could be related to the problem with the package attrs, which shadows Python's attr.

The Twisted/klein project seems to have solved this problem by writing a custom provides function: https://github.com/twisted/klein/pull/764.

Happening with Python 3.12.

Rodrigoplp commented 3 weeks ago

Fixed with (using PIP):

pip install -U pip setuptools wheel && \
pip install attrs==23.2.0 'cryptography<42' tahoe-lafs

Or (using UV):

uv lock --upgrade-package setuptools
uv add wheel
uv add 'attrs==23.2.0'
uv add 'cryptography<42'