Searching for campsites using a yaml file config is not working as I would expected. The equipment type does not seem to be recognized. I am seeing these warnings in the log. This could be user error, but I put as much detail as I could figure out.
[2023-07-20 22:41:06] WARNING Equipment name not recognized: R. This won't be used for filtering. Acceptable options
are: tent, rv, trailer, vehicle
[2023-07-20 22:41:06] WARNING Equipment name not recognized: 2. This won't be used for filtering. Acceptable options
are: tent, rv, trailer, vehicle
I put a breakpoint at line 158 in search_recreationdotgov.py and saw that the equipment tuple was over expanded
if isinstance(equipment, (list, tuple)):
157 final_equipment = []
158 breakpoint()
159 -> for equipment_name, equipment_length in equipment:
160 if (
(Pdb) equipment
[('R', 'V'), ('2', '5')]
Also the length of 25 is being treated as a string (and split).
Original Camply Command (with --debug)
pipenv run camply campsites --yaml-config proof.yaml --debug > debug.txt
Expected behavior
I expected the equipment type to be parsed into an equipment type string and length integer.
ValidationError: 4 validation errors for YamlSearchFile
equipment
value is not a valid integer (type=type_error.integer)
equipment -> 0
value is not a valid integer (type=type_error.integer)
equipment
str type expected (type=type_error.str)
equipment -> 0
str type expected (type=type_error.str)
Describe the bug
Searching for campsites using a yaml file config is not working as I would expected. The equipment type does not seem to be recognized. I am seeing these warnings in the log. This could be user error, but I put as much detail as I could figure out.
I put a breakpoint at line 158 in search_recreationdotgov.py and saw that the equipment tuple was over expanded
Also the length of 25 is being treated as a string (and split).
Original Camply Command (with
--debug
)Expected behavior I expected the equipment type to be parsed into an equipment type string and length integer.
Console Output (with
--debug
)debug.txt
Additional context
< Add any other context about the problem here. >
This is my yaml file, it is similar to the sample from the docs.
I tired to do as suggested in the docs of
But i get this error
I am not sure if this is 1 or 2 issues.
Thanks in advance!