Recently, i have been tested out this package and got this error which i guess might be a new security mechanism from myfitnesspal :
Exception has occurred: IndexError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
list index out of range
File "G:\0_9Health\6_data\python-myfitnesspal\.venv\Lib\site-packages\myfitnesspal-2.0.1-py3.10.egg\myfitnesspal\client.py", line 780, in get_food_search_results
utf8_field = document.xpath("(//input[@name='utf8']/@value)[1]")[0]
File "G:\0_9Health\6_data\python-myfitnesspal\src\search-foods.py", line 32, in <module>
food_items = client.get_food_search_results(ingredient_name)
File "C:\Users\9Health\.pyenv\pyenv-win\versions\3.10.6\Lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\9Health\.pyenv\pyenv-win\versions\3.10.6\Lib\runpy.py", line 196, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
IndexError: list index out of range
Hi guys,
Recently, i have been tested out this package and got this error which i guess might be a new security mechanism from myfitnesspal :
here is my code :
does you guys have the same problem as mine ?