Skip to content

Key Error  #5

Description

@Systm21

At the moment, there are 2 prefix_files in the keys folder. All data is anonymized so don't worry, everything is fine with above data.

Hope @mrmay-dev can help to fix it, i get stuck here.

anonymous@iMac-Pro application % python3 request_reports.py --time 23:59  --owntags
2029 Sep 99 (Mon) 24:05:06
Using python3
Days: 0, Hrs: 23, Min: 59
200 OK

271 reports received.
25 reports used.
Used 1000000000 as creation_stamp for bv14N+8
'bv14N+8'
Traceback (most recent call last):
  File "/Users/anonymous/Desktop/owntags-main/application/request_reports.py", line 182, in <module>
    ordered = owntags(ordered, time_window, found)
  File "/Users/anonymous/Desktop/owntags-main/application/OwnTags_plugin.py", line 118, in owntags
    if tag_options[prefix]["location"]:
KeyError: 'bv14N+8'

Activity

  1. mrmay-dev commented on Sep 12, 2023

    @mrmay-dev
    Owner

    This is tricky because key points can be shared to OwnTracks as waypoints or locations. Waypoints require unique timestamps. I was trying to have the script generate them for the user, but that creates a whole set of problems. So, it is best if you add them manually in the settings.toml.

    I've updated it, and a couple other things in the code. Let me know how it works

    Each keyfile MUST have it's corresponding block in settings. For each keyfile, copy this block and change it to match your keys.

    # Each tag can be configured to appear as 'waypoints' on your device only, or as 'locations' that are shared
    # with other users. 'locations' are easier to start with.
    # OwnTags can share the tag as both, odd things will happen and be prepared for some challenges.
    [tag_options.prefix] # change 'prefix' to your key prefix.
    tag_name = "prefix"  # the prefix of your key
    location = true   # (not required) locations are seen by everyone with access to the topic (they act like users)
    waypoint = false  # (not required) waypoints are only seen on your phone (or device)
    timestamp = 1000000001   # (required for wayponts) Must be unique, can be any past Unix/Posix timestamp.
    radius = false    # (not required) use number for radius in meters, if `false` turn off, if `true` use confidence
    # Advance Features
    tag_image = nan  # base 64 encoded, 200x200, PNG or JPEG image
    mqtt_topic = nan  # (not required)  topic for this tag, if `nan` owntags_base will be used
    status_topic = false    # (not required) if `True` messages will be published to `status_base`/prefix```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions