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

ImportError during Figaro running #60

Open
luigallucci opened this issue Jan 26, 2024 · 3 comments
Open

ImportError during Figaro running #60

luigallucci opened this issue Jan 26, 2024 · 3 comments

Comments

@luigallucci
Copy link

Hi all,

I'm trying to run figaro on a subset of samples. I'm facing this problems after running it with the following command set:

python3 figaro.py -i /Users/lgallucc/Desktop/Tempor/Luigi/ -o /Users/lgallucc/Desktop/TemporLuigi/Figaro -a 320 -f 20 -r 20

Traceback (most recent call last):
  File "/Users/lgallucc/figaro/figaro/figaro.py", line 4, in <module>
    from . import environmentParameterParser, fileNamingStandards, fastqAnalysis, trimParameterPrediction
ImportError: attempted relative import with no known parent package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/lgallucc/figaro/figaro/trimParameterPrediction.py", line 4, in <module>
    from . import fileNamingStandards
ImportError: attempted relative import with no known parent package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/lgallucc/figaro/figaro/figaro.py", line 6, in <module>
    import environmentParameterParser, fileNamingStandards, fastqAnalysis, trimParameterPrediction
  File "/Users/lgallucc/figaro/figaro/trimParameterPrediction.py", line 9, in <module>
    import fileNamingStandards, fastqHandler, fastqAnalysis, expectedErrorCurve
  File "/Users/lgallucc/figaro/figaro/expectedErrorCurve.py", line 13, in <module>
    class ExponentialFit(object):
  File "/Users/lgallucc/figaro/figaro/expectedErrorCurve.py", line 17, in ExponentialFit
    def __init__(self, a:float, b:float, c:float, covariance:collections.Iterable = None, rSquared:float = None, curvePNG:str=None):
AttributeError: module 'collections' has no attribute 'Iterable'
@luigallucci luigallucci changed the title Error during Figaro running ImportError during Figaro running Jan 26, 2024
@nvpatin
Copy link

nvpatin commented Feb 9, 2024

I am getting the same error, running Figaro on Mac OS 13.4.1 and Python 3.6. This also happens with higher Python versions (3.8 and 3.10).

@hjarnek
Copy link

hjarnek commented Mar 11, 2024

This is because since Python 3.3 the collections module has been succeeded by the collections.abc module. You can fix this by simply find&replace all instances of "collections" with "collections.abc" in all Figaro Python scripts that contain this module.

Figaro is not maintained anymore though. There has been some rumours about an update called Figaro2 for a long time, but not from Zymo.

@ayoraind
Copy link

ayoraind commented Jun 2, 2024

Thank you very much @hjarnek. Your suggestion bailed me out today. It worked!

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

4 participants