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: 'NoneType' object has no attribute 'groups' #15

Open
AngelaKru opened this issue May 14, 2017 · 9 comments
Open

AttributeError: 'NoneType' object has no attribute 'groups' #15

AngelaKru opened this issue May 14, 2017 · 9 comments

Comments

@AngelaKru
Copy link
Contributor

Since about Thursday/Friday of last week, I've been getting this error (worked fine the day before, nothing since, though I can download files manually from Garmin Connect - have they changed their interface again? Anyone have a workaround or solution?):

Downloading files for user *****
Login successful! Proceeding...
Traceback (most recent call last):
File "\download.py", line 261, in
download_files_for_user(username, password, output)
File "
\download.py", line 210, in download_files_for_user
login(agent, username, password)
File "*****\download.py", line 98, in login
response_url = re.search("response_url\s*=\s*'(.*)';", res.get_data()).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'

@magsol
Copy link
Owner

magsol commented May 15, 2017 via email

@AngelaKru
Copy link
Contributor Author

Yes, working fine earlier last week, then around Thursday or Friday suddenly the error cropped up, and I've been unable to download via this script since then.

@AngelaKru
Copy link
Contributor Author

AngelaKru commented May 15, 2017

seems a single quotation was changed to double-quotation:

changed: response_url = re.search("response_url\s*=\s*'(.*)';", res.get_data()).groups()[0]
to: response_url = re.search("response_url\s*=\s*"(.*)";", res.get_data()).groups()[0]

and that seems to be working for me

@magsol
Copy link
Owner

magsol commented May 15, 2017 via email

@AngelaKru
Copy link
Contributor Author

AngelaKru commented May 15, 2017

Looks like something got lost in the comment formatting:
response_url = re.search("response_url\s*=\s* \ "(.*) \ ";", res.get_data()).groups()[0]
(minus spaces around the quotes)
basically I just changed the 2 apostrophes surrounding the brackets to backslash-quotationmark

@magsol
Copy link
Owner

magsol commented May 15, 2017 via email

@raffdoc
Copy link

raffdoc commented Aug 11, 2017

Dear @AngelaKru
How exactly looks the that changed line that you are mentioning, I have used the line in your comment, it does not function for me.

@AngelaKru
Copy link
Contributor Author

@raffdoc -
The original line was this:
response_url = re.search("response_url\s*=\s*'(.*)';", res.get_data()).groups()[0]

now take the single quotes around (.) and add escaped double-quote (there's some trouble pasting that here as the quotes seem to be seen as special characters here): '(.)' becomes \ "(.*)\ " (but remove spaces)

@raffdoc
Copy link

raffdoc commented Aug 12, 2017

Thanks @AngelaKru

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

3 participants