<#1892 Add more tests for sensor> Pull request ope...
# flyte-github
a
#1892 Add more tests for sensor Pull request opened by pingsutw TL;DR Failed to run the sensor in the agent due to following error.
Copy code
{"asctime": "2023-10-14 10:58:59,300", "name": "flytekit", "levelname": "ERROR", "message": "task_type: \"sensor\"\nresource_meta: \"\\200\\005\\225l\\000\\000\\000\\000\\000\\000\\000}\\224(\\214\\rsensor_module\\224\\214\\033flytekit.sensor.file_sensor\\224\\214\\013sensor_name\\224\\214\\nFileSensor\\224\\214\\006inputs\\224}\\224\\214\\004path\\224\\214\\010/tmp/123\\224su.\"\n"}
 {"asctime": "2023-10-14 10:58:59,303", "name": "flytekit", "levelname": "ERROR", "message": "Importing module usr.local.bin.pyflyte from file /usr/local/bin/pyflyte"}
Previously, it worked, but this PR breaks it. We shouldn't import usr.local.bin.pyflyte since it's not even a module. Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☑︎ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description I've tested it in the flytectl demo cluster Tracking Issue flyteorg/flyte#3936 flyteorg/flyte#4245 Follow-up issue NA flyteorg/flytekit Codecov: 55.08% (-39.90%) compared to 85b8d29 ✅ 29 other checks have passed 29/30 successful checks