Monocle icon indicating copy to clipboard operation
Monocle copied to clipboard

'LANDMARKS' is not defined

Open spSoftCode opened this issue 7 years ago • 1 comments

##### Referencing landmarks in your tweets/notifications

#### It is recommended to store the LANDMARKS object in a pickle to reduce startup
#### time if you are using queries. An example script for this is in:
#### scripts/pickle_landmarks.example.py
#from pickle import load
#with open('pickles/landmarks.pickle', 'rb') as f:
#LANDMARKS = load(f)

### if you do pickle it, just load the pickle and omit everything below this point

#from monocle.landmarks import Landmarks
#LANDMARKS = Landmarks(query_suffix=AREA_NAME)

# Landmarks to reference when Pokémon are nearby
# If no points are specified then it will query OpenStreetMap for the coordinates
# If 1 point is provided then it will use those coordinates but not create a shape
# If 2 points are provided it will create a rectangle with its corners at those points
# If 3 or more points are provided it will create a polygon with vertices at each point
# You can specify the string to search for on OpenStreetMap with the query parameter
# If no query or points is provided it will query with the name of the landmark (and query_suffix)
# Optionally provide a set of hashtags to be used for tweets about this landmark
# Use is_area for neighborhoods, regions, etc.
# When selecting a landmark, non-areas will be chosen first if any are close enough
# the default phrase is 'in' for areas and 'at' for non-areas, but can be overriden for either.

### replace these with well-known places in your area

## since no points or query is provided, the names provided will be queried and suffixed with AREA_NAME
#LANDMARKS.add('Rice Eccles Stadium', shortname='Rice Eccles', hashtags={'Utes'})
#LANDMARKS.add('the Salt Lake Temple', shortname='the temple', hashtags={'TempleSquare'})

## provide two corner points to create a square for this area
#LANDMARKS.add('City Creek Center', points=((40.769210, -111.893901), (40.767231, -111.888275)), hashtags={'CityCreek'})

LANDMARKS.add('Molouno', points=((43.863396, 10.239107), (43.863439, 10.239314)), hashtags={'molo1'})
LANDMARKS.add('Molodue', points=((43.862994, 10.239065), (43.863078, 10.239319)), hashtags={'molo2'})
File "C:\Users\...\...\... ...\Monocle\monocle\config.py", line 357, in <module>
    LANDMARKS.add('Molouno', points=((43.862240, 10.235216), (43.862302, 10.235454)), hashtags={'molo1'})
NameError: name 'LANDMARKS' is not defined

Its about 4 or more hours i'm trying to set a new Landmarks but i have got the same error NameError: name 'LANDMARKS' is not defined

How can i set up the new landmarks? inside config file or external file? or can how can i define this landmarks variables / object?

Any solution?

spSoftCode avatar Jun 18 '17 20:06 spSoftCode

Have you tried uncomment this? #from monocle.landmarks import Landmarks #LANDMARKS = Landmarks(query_suffix=AREA_NAME)

MiguelGall avatar Jun 19 '17 01:06 MiguelGall