Skip to content

Conversation

@n-poulsen
Copy link
Contributor

This fixes a small bug, as reported in the DeepLabCut forum:

deeplabcut\gui\tabs\train_network.py”, line 78, in _update_snapshot_selection_widgets_visibility
if self._shuffle_display.pose_cfg.get(“method”).lower() == “td”:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: ‘NoneType’ object has no attribute ‘lower’

If the selected shuffle is a shuffle with the TensorFlow engine, then the pose_cfg won't have a "method" key, so self._shuffle_display.pose_cfg.get(“method”) will return None and the code will crash.

@n-poulsen n-poulsen added bug fix! fix for a real buggy one... DLC3.0🔥 labels Nov 11, 2024
@n-poulsen n-poulsen changed the title Fix: gui\tabs\train_network.py, AttributeError: ‘NoneType’ object has no attribute ‘lower’ Fix: gui/tabs/train_network.py, AttributeError: ‘NoneType’ object has no attribute ‘lower’ Nov 11, 2024
@maximpavliv maximpavliv merged commit 48c5969 into pytorch_dlc Nov 11, 2024
@n-poulsen n-poulsen deleted the niels/gui_train_network_get_method_bugfix branch November 11, 2024 14:34
xiu-cs pushed a commit to xiu-cs/DeepLabCut that referenced this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix! fix for a real buggy one... DLC3.0🔥

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants