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

AttributeError: module 'collections' has no attribute 'Callable' #8

Closed
sangaman opened this issue Sep 13, 2022 · 1 comment
Closed

Comments

@sangaman
Copy link

When I try to run DataCrawler.py on my recently downloaded 23andme genome, I get this error.

Traceback (most recent call last):
  File "/home/danielmcnally/github/OSGenome/SNPedia/DataCrawler.py", line 168, in <module>
    dfCrawl = SNPCrawl(rsids=rsid)
  File "/home/danielmcnally/github/OSGenome/SNPedia/DataCrawler.py", line 35, in __init__
    self.initcrawl(rsids)
  File "/home/danielmcnally/github/OSGenome/SNPedia/DataCrawler.py", line 43, in initcrawl
    self.grabTable(rsid)
  File "/home/danielmcnally/github/OSGenome/SNPedia/DataCrawler.py", line 63, in grabTable
    bs = BeautifulSoup(html, "html.parser")
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/__init__.py", line 228, in __init__
    self._feed()
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/__init__.py", line 289, in _feed
    self.builder.feed(self.markup)
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/builder/_htmlparser.py", line 167, in feed
    parser.feed(markup)
  File "/usr/lib/python3.10/html/parser.py", line 110, in feed
    self.goahead(0)
  File "/usr/lib/python3.10/html/parser.py", line 178, in goahead
    k = self.parse_html_declaration(i)
  File "/usr/lib/python3.10/html/parser.py", line 269, in parse_html_declaration
    self.handle_decl(rawdata[i+2:gtpos])
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/builder/_htmlparser.py", line 112, in handle_decl
    self.soup.endData(Doctype)
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/__init__.py", line 365, in endData
    self.object_was_parsed(o)
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/__init__.py", line 370, in object_was_parsed
    previous_element = most_recent_element or self._most_recent_element
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1040, in __getattr__
    return self.find(tag)
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1278, in find
    l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1299, in find_all
    return self._find_all(name, attrs, text, limit, generator, **kwargs)
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 528, in _find_all
    strainer = SoupStrainer(name, attrs, text, **kwargs)
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1596, in __init__
    self.text = self._normalize_search_value(text)
  File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1601, in _normalize_search_value
    if (isinstance(value, str) or isinstance(value, collections.Callable) or hasattr(value, 'match')
AttributeError: module 'collections' has no attribute 'Callable'
@sangaman
Copy link
Author

Very sorry, I opened this in the wrong repository!

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

1 participant