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

Key Error #5

Open
Systm21 opened this issue Sep 11, 2023 · 1 comment
Open

Key Error #5

Systm21 opened this issue Sep 11, 2023 · 1 comment

Comments

@Systm21
Copy link

Systm21 commented Sep 11, 2023

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'
@mrmay-dev
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants