Skip to content

Live Data Unavailable #4

@mpcahn

Description

@mpcahn

It was working flawlessly until about a week ago and now it says "None" under ' current Popularity'

Here's the code:

import livepopulartimes
from google.colab import userdata

# Assuming api_key is already defined in the previous cell
# If not, uncomment the line below and replace with your actual API key
api_key = userdata.get('MAPS_API_KEY')

# Let's pick one of the place_ids that previously showed 'No Data'
sample_place_id = "ChIJbdhGJMV4bIcRg8f1QbNi0_Y" # Larimer Lounge

try:
    print(f"Fetching data for Place ID: {sample_place_id}")
    data = livepopulartimes.get_populartimes_by_PlaceID(api_key, sample_place_id)
    print("\nFull data response:")
    print(data)

    print("\n--- Specific fields inspection ---")
    print(f"'current_popularity': {data.get('current_popularity')}")
    print(f"'popular_times': {data.get('popular_times')}")

except Exception as e:
    print(f"An error occurred: {e}")

Here's the output:

Fetching data for Place ID: ChIJbdhGJMV4bIcRg8f1QbNi0_Y

Full data response:
{'place_id': 'ChIJbdhGJMV4bIcRg8f1QbNi0_Y', 'name': 'The Front Porch', 'hours': {'open_now': True, 'periods': [{'close': {'day': 1, 'time': '0200'}, 'open': {'day': 0, 'time': '1700'}}, {'close': {'day': 2, 'time': '0200'}, 'open': {'day': 1, 'time': '1700'}}, {'close': {'day': 3, 'time': '0200'}, 'open': {'day': 2, 'time': '1700'}}, {'close': {'day': 4, 'time': '0200'}, 'open': {'day': 3, 'time': '1700'}}, {'close': {'day': 5, 'time': '0200'}, 'open': {'day': 4, 'time': '1700'}}, {'close': {'day': 6, 'time': '0200'}, 'open': {'day': 5, 'time': '1700'}}, {'close': {'day': 0, 'time': '0200'}, 'open': {'day': 6, 'time': '1830'}}], 'weekday_text': ['Monday: 5:00\u202fPM\u2009–\u20092:00\u202fAM', 'Tuesday: 5:00\u202fPM\u2009–\u20092:00\u202fAM', 'Wednesday: 5:00\u202fPM\u2009–\u20092:00\u202fAM', 'Thursday: 5:00\u202fPM\u2009–\u20092:00\u202fAM', 'Friday: 5:00\u202fPM\u2009–\u20092:00\u202fAM', 'Saturday: 6:30\u202fPM\u2009–\u20092:00\u202fAM', 'Sunday: 5:00\u202fPM\u2009–\u20092:00\u202fAM']}, 'place_types': None, 'coordinates': {'lat': 39.747935399999996, 'lng': -104.9979006}, 'rating': 4, 'international_phone_number': '+1 720-840-6156', 'address': '1215 15th St, Denver, CO 80202', 'categories': ['Bar'], 'current_popularity': None, 'popular_times': None}

--- Specific fields inspection ---
'current_popularity': None
'popular_times': None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions