Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import morelet #251

Open
seokhee-kang opened this issue May 23, 2023 · 2 comments
Open

Cannot import morelet #251

seokhee-kang opened this issue May 23, 2023 · 2 comments

Comments

@seokhee-kang
Copy link

Hi,
I ran the following code and got ImportError, could it be because of my environment set up? Thank you for the help!

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Input In [1], in <cell line: 2>()
      1 from ptsa.data.timeseries import TimeSeries 
----> 2 from ptsa.data.filters import MorletWaveletFilter, ResampleFilter, ButterworthFilter

File ~/opt/anaconda3/lib/python3.9/site-packages/ptsa/data/filters/__init__.py:5, in <module>
      3 from .data_chopper import DataChopper
      4 from .monopolar_to_bipolar_mapper import MonopolarToBipolarMapper
----> 5 from .morlet import MorletWaveletFilter
      6 from .resample import ResampleFilter

File ~/opt/anaconda3/lib/python3.9/site-packages/ptsa/data/filters/morlet.py:8, in <module>
      6 from ptsa.data.timeseries import TimeSeries
      7 from ptsa.data.filters import BaseFilter
----> 8 from ptsa.extensions import morlet
     11 class MorletWaveletFilter(BaseFilter):
     12     """Applies a Morlet wavelet transform to a time series, returning the power
     13     and phase spectra over time.
     14 
   (...)
     43 
     44     """

File ~/opt/anaconda3/lib/python3.9/site-packages/ptsa/extensions/morlet/__init__.py:1, in <module>
----> 1 from .morlet import *

File ~/opt/anaconda3/lib/python3.9/site-packages/ptsa/extensions/morlet/morlet.py:13, in <module>
     11 # Import the low-level C/C++ module
     12 if __package__ or "." in __name__:
---> 13     from . import _morlet
     14 else:
     15     import _morlet

ImportError: cannot import name '_morlet' from partially initialized module 'ptsa.extensions.morlet' (most likely due to a circular import) (/Users/ss/opt/anaconda3/lib/python3.9/site-packages/ptsa/extensions/morlet/__init__.py)
@NxNiki
Copy link

NxNiki commented Dec 20, 2024

Hi @seokhee-kang, I had the same error for python 3.10.14. Did you figure out how to resolve it?

@NxNiki
Copy link

NxNiki commented Jan 8, 2025

Hi @seokhee-kang, I had the same error for python 3.10.14. Did you figure out how to resolve it?

Hi @seokhee-kang, it seems you can build the package from the source see here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants