Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Missing dependency to lxml for URL previewing #2425

Closed
babolivier opened this issue Aug 21, 2017 · 12 comments
Closed

Missing dependency to lxml for URL previewing #2425

babolivier opened this issue Aug 21, 2017 · 12 comments
Assignees
Labels
A-Packaging Our Debian packages, docker images; or issues relevant to downstream packagers

Comments

@babolivier
Copy link
Contributor

babolivier commented Aug 21, 2017

URL previewing in Synapse requires the lxml library (python[2]-lxml) to work (source: tried to run Synapse without the lxml package installed and with URL previewing enabled and it crashed), but this optional dependency is missing from synapse/python_dependencies.py.

Should be an easy one to fix but I'm unsure about the lowest working version of lxml for this feature.

@gpierron
Copy link

Got the same problem here. (debian stable package from repository (0.22.1-1)

@ara4n
Copy link
Member

ara4n commented Sep 17, 2017

we deliberately didn't include lxml in the deps for synapse as it's a beast and only needed for optional url previews. so the readme asks users to install manually when needed. this was @erikjohnston's idea; i forget why we don't put it in the optional deps (other than possibly optional deps get installed anyway?)

@kyrias
Copy link
Contributor

kyrias commented Sep 18, 2017

I mean, if it's not listed as a conditional dependency for URL previewing, that makes that section of the dependencies script entirely useless and misleading, so removing it entirely and listing it in e.g. the README or related document would be much better.

@turt2live
Copy link
Member

fwiw, synapse does complain about the missing dependency in a sensible manner.

@richvdh
Copy link
Member

richvdh commented May 29, 2018

it is listed in the readme. I think this is working as intended.

@richvdh richvdh closed this as completed May 29, 2018
@kyrias
Copy link
Contributor

kyrias commented May 29, 2018

I'd say it still feels very inconsistent and misleading to list some dependencies of URL previewing under CONDITIONAL_REQUIREMENTS but not all of them.

@richvdh
Copy link
Member

richvdh commented May 29, 2018

oh, yes it is. sorry, I hadn't realised that we have a separate section of CONDITIONAL_REQUIREMENTS for preview_url. Could somebody just make a PR for this?

@richvdh richvdh reopened this May 29, 2018
@erikjohnston
Copy link
Member

erikjohnston commented May 29, 2018

CONDITIONAL_REQUIREMENTS is a bit weird in that I think that all the packages listed will be installed when using e.g. pip, but on the other hand won't stop synapse from starting. If we added lxml then pip would try and install it and likely fail due to lack of libxml2-dev library, which wouldn't be ideal.

Whether we necessarily want to install CONDITIONAL_REQUIREMENTS by default with pip is a possible question.

@richvdh
Copy link
Member

richvdh commented May 29, 2018

@erikjohnston: so why do we bother listing netaddr there?

@hawkowl hawkowl self-assigned this Dec 12, 2018
@hawkowl hawkowl added the A-Packaging Our Debian packages, docker images; or issues relevant to downstream packagers label Dec 12, 2018
@hawkowl
Copy link
Contributor

hawkowl commented Dec 21, 2018

Fixed in #4298 .

@hawkowl hawkowl closed this as completed Dec 21, 2018
@rubo77
Copy link
Contributor

rubo77 commented Sep 28, 2023

what is the workaround? I tried

apt install python3-lxml 

but no luck

@rubo77
Copy link
Contributor

rubo77 commented Sep 28, 2023

Workaround:

pip install lxml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Packaging Our Debian packages, docker images; or issues relevant to downstream packagers
Projects
None yet
Development

No branches or pull requests

9 participants