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

Broken on Python 3.7 - access to re._pattern_type in Browser.get_link() #87

Open
jbarlow83 opened this issue Jul 3, 2018 · 1 comment

Comments

@jbarlow83
Copy link

jbarlow83 commented Jul 3, 2018

In robobrowser.RoboBrowser.get_link()

  File "/usr/local/lib/python3.7/site-packages/robobrowser/browser.py", line 269, in get_link
    self.parsed, _link_ptn, text=text, *args, **kwargs
  File "/usr/local/lib/python3.7/site-packages/robobrowser/helpers.py", line 51, in find
    soup, name, attrs or {}, recursive, text, 1, **kwargs
  File "/usr/local/lib/python3.7/site-packages/robobrowser/helpers.py", line 39, in find_all
    if match_text(text, tag):
  File "/usr/local/lib/python3.7/site-packages/robobrowser/helpers.py", line 16, in match_text
    if isinstance(text, re._pattern_type):
AttributeError: module 're' has no attribute '_pattern_type'

See also python/cpython#1646

@jbarlow83
Copy link
Author

Users can work around the issue by setting import re; re._pattern_type = re.Pattern prior to making any calls to the robobrowser module.

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