wpilibsuite / WPILibPi

WPILib Raspberry Pi images designed for FRC (formerly FRCVision)
Other
86 stars 40 forks source link

Basic Vision Example missing a dependency #171

Closed williamhaley closed 3 years ago

williamhaley commented 3 years ago

The Basic Vision Example (src) code does not seem to work with the WPILibPi_image-v2021.1.1-beta-4 release.

I know this work is still flagged as in progress/unstable, but wanted to raise the issue in case it's something that was overlooked.

Not sure if this is an issue with the documentation or the image (or me :-D, if I'm overlooking a step)

Waiting 5 seconds...

Traceback (most recent call last):
  File "uploaded.py", line 1, in <module>

    from cscore import CameraServer
  File "/usr/local/lib/python3.7/dist-packages/cscore/__init__.py", line 1, in <module>
    from _cscore import *
PeterJohnson commented 3 years ago

This is likely an issue with the image. I'll look into it.

williamhaley commented 3 years ago

Thanks @PeterJohnson! I confirmed that I can get past that issue using the stable FRCVision-v2020.2.1_2020-01-19 image.

I think the docs for the example do also need some updates though. It looks like main isn't invoked, sink is undefined, time needs to be imported, and json.load needs a file reference like... json.load(open('/boot/frc.json')).

I'll see if I can get the example code running on the stable image and open a PR for that code, but I may be out of my depth and hit a wall.