masqu3rad3 / tik_manager4

Tik Manager is a Python-based Pipeline and Project Management platform designed for VFX and Animation Projects.
GNU General Public License v3.0
80 stars 4 forks source link

Can't delete Sub-Projects #86

Closed TobiasPharos closed 2 months ago

TobiasPharos commented 2 months ago

Describe the bug When I'm in the Main UI (no matter if Standalone or Nuke 14.1v2). I can't delete Sub Projects using RMB > Delete Sub-Project(s)

To Reproduce Steps to reproduce the behavior:

  1. Go to Main UI
  2. Click on Sub-Project to delete
  3. Right click
  4. Delete Sub-Project(s)
  5. OK

Expected behavior Subproject should be removed.

DCC Please complete the following information:

Desktop (please complete the following information):

Traceback File "C:\TikManager\env\tik_manager4\tik_manager4\ui\mcv\subprojectmcv.py", line 532, in lambda =None, x=item: self.delete_sub_project(item) File "C:\TikManager\env\tik_manager4\tik_manager4\ui\mcv\subproject_mcv.py", line 647, in delete_sub_project state = self.model.project.delete_sub_project(uid=item.subproject.id) File "C:\TikManager\env\tik_manager4\tik_manager4\objects\project.py", line 113, in delete_sub_project if self._remove_sub_project(uid, path) == -1: File "C:\TikManager\env\tik_manager4\tik_manager4\objects\subproject.py", line 469, in _remove_sub_project del parent_sub.subs[kill_sub.name] AttributeError: 'int' object has no attribute 'subs'

masqu3rad3 commented 2 months ago

Hi, I couldn't replicate this issue on latest release (4,0.81) . Can you confirm on which release you are getting this error?

TobiasPharos commented 2 months ago

Yes, I'm using 4.0.81 too.

masqu3rad3 commented 2 months ago

Can you test:

I suspect that may be happening because of a corrupted file or access issute. The error message you sent indicates that the sub-project you are trying to delete cannot be found.

I tested it on all dccs, standalone (both python and exe version) Additionally the unit tests cover that are an those are getting tested with github CI for windows, linux and macos. All passes the tests.

TobiasPharos commented 2 months ago

Thank you, Arda. This helped to narrow it down. It works up to the 2nd level of sub-projects. Trying to delete the 3rd (or higher) level leads to the error. However deleting a 2nd level with a 3rd level below works.

image

masqu3rad3 commented 2 months ago

Right okay, I managed to replicate the issue. Many thanks for flagging. I will look into that.

masqu3rad3 commented 2 months ago

A fix merged to the master, will be available with next release. Thanks again for finding and flagging this @TobiasPharos