costastf / locationsharinglib

A library to retrieve coordinates from an google account that has been shared locations of other accounts.
MIT License
170 stars 29 forks source link

SyntaxError: invalid Syntax in "domain: str" #79

Closed emilyboda closed 4 years ago

emilyboda commented 4 years ago

I'm getting the following error:

pi@pi:~/google-maps-location-files $ python3 get-location.py                    Traceback (most recent call last):
  File "get-location.py", line 1, in <module>
    from locationsharinglib import Service
  File "/home/pi/.local/lib/python3.5/site-packages/locationsharinglib/__init__.py", line 36, in <module>
    from .locationsharinglib import Service, Person
  File "/home/pi/.local/lib/python3.5/site-packages/locationsharinglib/locationsharinglib.py", line 75
    domain: str
          ^
SyntaxError: invalid syntax

My file get-location.py is as follows:

from locationsharinglib import Service
cookies_file = '/home/pi/google-maps-location-files/.google_maps_location_sharing.cookies.MYEMAILADDRESS_gmail_com'
google_email = 'MYEMAILADDRESS@gmail.com'
service = Service(cookies_file=cookies_file, authenticating_account=google_email)
for person in service.get_all_people():
    print(person)

Can anyone help me understand what I'm doing wrong?

My cookies file looks like this. Is this correct? I will remove the link to the cookies file soon because I am not totally sure what information about it can be used against me...

costastf commented 4 years ago

Please remove your cookie file, if it is correct anyone can use it to log in to your services.

costastf commented 4 years ago

The issue you are having is because you are using python 3.5 . There code uses dataclasses which are a feature of python 3.7. there is a dataclasses package that can be installed for 3.6 but honestly there is no point.

costastf commented 4 years ago

I suggest you use pyenv if you are on a *nix system and install 3.7 and everything will work just fine. Apologies for not answering earlier but I did not get a notification about the issue being opened.

costastf commented 4 years ago

Just saw that you have blurred your cookie file, so you are good :) I will be closing this since it is not an issue but if you need any help please don't hesitate to add a comment.