Skip to content

Fix python3 migration bug - #185

Open
JacobTerritory wants to merge 3 commits into
shotgunsoftware:masterfrom
territorystudiopipeline:fix_python3_migration_bug
Open

Fix python3 migration bug#185
JacobTerritory wants to merge 3 commits into
shotgunsoftware:masterfrom
territorystudiopipeline:fix_python3_migration_bug

Conversation

@JacobTerritory

Copy link
Copy Markdown

No description provided.

…would evaluate to False rather than a ValueError. Manifested when openning another user's user folders
@JacobTerritory
JacobTerritory force-pushed the fix_python3_migration_bug branch 2 times, most recently from 0717610 to 2b01190 Compare July 21, 2026 14:59
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.55%. Comparing base (2ad3aea) to head (2b01190).
⚠️ Report is 41 commits behind head on master.

Files with missing lines Patch % Lines
python/tk_multi_workfiles/scene_operation.py 25.00% 3 Missing ⚠️
...thon/tk_multi_workfiles/actions/new_file_action.py 33.33% 2 Missing ⚠️
...k_multi_workfiles/actions/context_change_action.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #185       +/-   ##
===========================================
+ Coverage        0   32.55%   +32.55%     
===========================================
  Files           0       68       +68     
  Lines           0     7692     +7692     
===========================================
+ Hits            0     2504     +2504     
- Misses          0     5188     +5188     
Flag Coverage Δ
Linux 32.55% <25.00%> (?)
Python-3.10 32.53% <25.00%> (?)
Python-3.11 32.54% <25.00%> (?)
Python-3.13 32.54% <25.00%> (?)
Python-3.9 32.53% <25.00%> (?)
Windows 19.63% <25.00%> (?)
macOS 32.55% <25.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@julien-lang

Copy link
Copy Markdown
Member

Hi @JacobTerritory, thanks for your contribution.

Could you provide more information about the problems you are trying to fix here, please?
We are not aware of any Python 3 related issues with tk-multi-workfiles2.

@JacobTerritory

Copy link
Copy Markdown
Author

Apologies, we forked the repository to add some additional features which I didn't mean to push back.

However, the latest commit here, to interactive_open_action.py is a bugfix due to a change from Python 2.7 -> 3.x.

In python 2.7, NoneType < Int would evaluate to True, but in python 3.x it raises a TypeError. So we must check for NoneType before evaluating the if condition.

@julien-lang

julien-lang commented Aug 27, 2026

Copy link
Copy Markdown
Member

Hi @JacobTerritory, thanks for answering my questions. I have a couple of follow up questions.

Regarding the additional feature, would you be able to remove them from this PR, please?

About the Python 3 regression, do you have a way to reproduce this issue? I mean, I agree with the logic and your explaination. But it would be easier for us to have clear reproduction steps so we can mark this as a regression and prioritize it.

Then, last point, the CI reports issues with code styling. Could you run pre-commit locally to fix it please and then push the changes?

Thanks 🙏

@JacobTerritory

Copy link
Copy Markdown
Author

I'm not sure on exact reliable reproduction steps, because this is obviously not a common issue, otherwise it would have been flagged years ago.

For us, it's happening whenever an artist tried opening a scene file at the project level, from another artists user folder other than their own.

@JacobTerritory

Copy link
Copy Markdown
Author

I didn't want to modify this branch on our fork, so I've instead created a new branch, and dropped the other 2 commits.

I've submitted another PR here. (I don't think I have permission to change the branch on this PR)
#186

@julien-lang

Copy link
Copy Markdown
Member

Thanks @JacobTerritory, can we close this PR then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants