question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SoCo erroring on import

See original GitHub issue
  • Raspberry Pi
  • Python 3.9.2
Jun 27 05:31:30 raspberrypi python3[743]:     import soco
Jun 27 05:31:30 raspberrypi python3[743]:   File "/usr/local/lib/python3.9/dist-packages/soco/__init__.py", line 12, in <module>
Jun 27 05:31:30 raspberrypi python3[743]:     from .core import SoCo
Jun 27 05:31:30 raspberrypi python3[743]:   File "/usr/local/lib/python3.9/dist-packages/soco/core.py", line 55, in <module>
Jun 27 05:31:30 raspberrypi python3[743]:     from .zonegroupstate import ZoneGroupState
Jun 27 05:31:30 raspberrypi python3[743]:   File "/usr/local/lib/python3.9/dist-packages/soco/zonegroupstate.py", line 66, in <module>
Jun 27 05:31:30 raspberrypi python3[743]:     from lxml import etree as LXML
Jun 27 05:31:30 raspberrypi python3[743]: ImportError: libxslt.so.1: cannot open shared object file: No such file or directory

My first thought is perhaps I’ve missed installing a new dependency?

Open to all suggestions please, as this has only just started happening as of today (27/06/2022).

Thank you!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
pwtcommented, Jun 28, 2022

Thanks for testing. That’s pulling down a pre-built binary wheel, as I’d expect.

Looking at the lxml installation instructions, there’s also a dependency on the libxml2 and libxslt system libraries, if the pre-built binary is dynamically linked.

The Windows binary is statically linked, so has no additional dependencies.

Based on the binary sizes, I think the ARM 64 binary (6.6MB) is statically linked:

Using cached lxml-4.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl (6.6 MB)

whereas the ARM 32 binary (2.3MB) is dynamically linked:

Downloading https://www.piwheels.org/simple/lxml/lxml-4.9.0-cp37-cp37m-linux_armv7l.whl (2.3MB)

For systems which obtain a dynamically linked lxml binary the required system libraries will need to be present or separately installed. There are notes on how to do this in the lxml documentation.

I’ll see what other reports of installation issues emerge, and I’ll update the release notes to reference this issue.

0reactions
pwtcommented, Jul 25, 2022

I’ve merged #920. This improvement will appear in v0.28.1 (from the v0.28 fixes branch) at some point.

Now closing this issue in favour of #921.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source code for soco.events_twisted - SoCo's documentation!
Example: Run this code, and change your volume, tracks etc:: from __future__ import print_function import logging logging.basicConfig() import soco from ...
Read more >
Pystan erroring on import - The Stan Forums
Hello. I just installed pystan via pip install pystan and when I try to import I get the following error: ImportError Traceback (most...
Read more >
AP Invoice Import Callback Integration erroring with Primary ...
We have AP Invoice Import integration that is successfully executed with invoices imported but the Callback integration ends in error ...
Read more >
Python Exception cought but stack trace printed anyways
The exception is being caught correctly. Check the documentation for the Logger class. Using it the way you have results in the exception ......
Read more >
Bulk CSV Import Errors - Freshworks Community
On the extreme right of the file, the reason for failure will be provided. Kindly rectify the errors shown and try re-importing the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found