keatonb / Pyriod

Python implementation of basic period detection and fitting routines for astronomical time series.
GNU General Public License v3.0
38 stars 7 forks source link

Error importing Pyriod #10

Closed gferrini closed 1 year ago

gferrini commented 1 year ago

Hi,

using Jupyter Notebooks, I have thi issue importing Pyriod:


ImportError Traceback (most recent call last) /tmp/ipykernel_19952/133210092.py in 1 get_ipython().run_line_magic('matplotlib', 'widget') ----> 2 from Pyriod import Pyriod

~/anaconda3/lib/python3.9/site-packages/Pyriod/init.py in 1 from future import absolute_import 2 ----> 3 from .Pyriod import Pyriod

~/anaconda3/lib/python3.9/site-packages/Pyriod/Pyriod.py in 41 from lmfit import Model, Parameters 42 from bs4 import BeautifulSoup ---> 43 from bs4.builder import XMLParsedAsHTMLWarning 44 import matplotlib.pyplot as plt 45 from matplotlib.widgets import LassoSelector

ImportError: cannot import name 'XMLParsedAsHTMLWarning' from 'bs4.builder' (/home/gianfranco/anaconda3/lib/python3.9/site-packages/bs4/builder/init.py)

keatonb commented 1 year ago

Thanks for reporting this issue! It's a new one. Can you please check what version of beautifulsoup4 you have installed?

gferrini commented 1 year ago

I have tried with a Linux and a Windwos systems: in both I have the version 4.0.10 of beautifulsoup4.

keatonb commented 1 year ago

Can you please try to reinstall beautifulsoup4 with pip install --upgrade --force-reinstall beautifulsoup4?

Another colleague of mine ran into this issue recently and this solved the problem for her.

gferrini commented 1 year ago

I also solved it with pip install --upgrade --force-reinstall beautifulsoup4. Thanks