lpsinger / ligo.skymap

Localization of gravitational-wave transients. Mirror of https://git.ligo.org/lscsoft/ligo.skymap
22 stars 18 forks source link

Error while importing io from ligo.skymap #11

Closed tabbott36 closed 2 years ago

tabbott36 commented 2 years ago

Hello, I'm trying to use io from ligo.skymap on Google Colab however, when I run the following: !pip install ligo.skymap from ligo.skymap import io I get ImportError: cannot import name 'IDTypes' from 'ligo.lw.types'

This worked fine for me a month ago so I thought !pip install ligo.skymap==0.5.3 would work but I got the same error. Thank you in advance for the help!

tabbott36 commented 2 years ago

Turns out it has something to do with a recent update to the python-ligo-lw package. By installing an older version (!pip install python-ligo-lw==1.7.1 everything worked fine! Cheers!

lpsinger commented 2 years ago

Yep, you found the workaround. There were a bunch of API changes in the latest version of python-ligo-lw. The latest version of ligo.skymap, 0.6.0, limits the maximum version of python-ligo-lw.