Open lixxbox opened 8 months ago
Can be hot-patched by editing the models.py
which was throwing an error as follows:
@dataclass
class IPCam:
ipcam_dev: Optional[str] = None
ipcam_record: Optional[str] = None
timelapse: Optional[str] = None
mode_bits: Optional[int] = None
resolution: Optional[int] = None # // evnchn
@dataclass
class LightsReport:
node: Optional[str] = None
mode: Optional[str] = None
@dataclass
class UpgradeState:
sequence_id: Optional[int] = None
progress: Optional[str] = None
status: Optional[str] = None
consistency_request: Optional[bool] = None
dis_state: Optional[int] = None
err_code: Optional[int] = None
force_upgrade: Optional[bool] = None
message: Optional[str] = None
module: Optional[str] = None
new_version_state: Optional[int] = None
new_ver_list: Optional[List[Any]] = None
cur_state_code: Optional[int] = None # // evnchn
Personally, hardcoding the fields may not be a good idea if it does not fail gracefully. I shall look into more graceful ways of handling discrepancies caused by version updates, and if I do come up with a solution, I shall pull request.
Mainly the issue now is the camera stream is not working
having the same issure here.
edited models.py
like this:
self.ipcam = None # IPCam(**data["ipcam"]) if "ipcam" in data else None // z00kiii
self.vt_tray = None # VTTray(**data["vt_tray"]) if "vt_tray" in data else None // z00kiii
self.lights_report = [LightsReport(**lr) for lr in data.get("lights_report", [])]
self.upgrade_state = None # UpgradeState(**data["upgrade_state"]) if "upgrade_state" in data else None //z00kiii
dirty as well but @evnchn's approach did not work for me, as there occurred other problems with IPCam, VTTray and upgrade State
I opened a new issue because the error seems to be a different one.
Today I updated my P1S to the new version today. Since then, I get the following error:
There seem to be some new key/value pairs. Can't tell you, which ones, exactly. Some I've found: ipcam.resolution, nozzle_type, filam_bak, nozzle_diameter, upgrade_state.cur_state_code. I also don't know if there are differences between X/P/A-series...