Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: Fix FileNotFoundError when running tasks #4759

Merged
merged 3 commits into from
Apr 7, 2022

Conversation

mdcutone
Copy link
Member

@mdcutone mdcutone commented Apr 6, 2022

If a Builder task is passed to runner without saving first, the task list item created uses a relative path instead of absolute which causes an unhandled exception to occur when running the file. This patch prevents this from happening by ensuring absolute paths are used when building the command for Job.

I also added a dialog box and log messages to catch errors trying to start a subprocess, made some changes to ensure the UI state is correct after such an error occurs to maintain app stability.

@mdcutone mdcutone requested a review from TEParsons April 6, 2022 20:38
@lgtm-com
Copy link

lgtm-com bot commented Apr 6, 2022

This pull request introduces 1 alert when merging ce62420 into 2a2f56d - view on LGTM.com

new alerts:

  • 1 for Unused import

@TEParsons
Copy link
Contributor

How is a Builder experiment passed to the Runner without saving? It should prompt the user to save when the "Send To Runner" button is clicked, and seems to when I try

@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #4759 (09d5e21) into release (9fcdb76) will decrease coverage by 0.58%.
The diff coverage is 9.37%.

@@             Coverage Diff             @@
##           release    #4759      +/-   ##
===========================================
- Coverage    45.32%   44.73%   -0.59%     
===========================================
  Files          294      294              
  Lines        58845    58871      +26     
  Branches     10393    10398       +5     
===========================================
- Hits         26671    26338     -333     
- Misses       29793    30168     +375     
+ Partials      2381     2365      -16     
Impacted Files Coverage Δ
psychopy/app/runner/runner.py 49.65% <0.00%> (-0.09%) ⬇️
psychopy/app/runner/scriptProcess.py 22.40% <8.69%> (-3.57%) ⬇️
psychopy/app/jobs.py 35.60% <20.00%> (-0.22%) ⬇️
psychopy/platform_specific/darwin.py 0.00% <0.00%> (-48.64%) ⬇️
psychopy/gui/qtgui.py 12.17% <0.00%> (-26.93%) ⬇️
psychopy/microphone.py 13.27% <0.00%> (-20.18%) ⬇️
psychopy/platform_specific/__init__.py 47.05% <0.00%> (-11.77%) ⬇️
psychopy/constants.py 55.17% <0.00%> (-6.90%) ⬇️
psychopy/web.py 37.24% <0.00%> (-4.14%) ⬇️
psychopy/visual/backends/pygletbackend.py 43.36% <0.00%> (-4.07%) ⬇️
... and 12 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@TEParsons TEParsons merged commit 2b411a9 into psychopy:release Apr 7, 2022
@lgtm-com
Copy link

lgtm-com bot commented Apr 7, 2022

This pull request introduces 1 alert when merging 09d5e21 into 9fcdb76 - view on LGTM.com

new alerts:

  • 1 for Unused import

@mdcutone mdcutone deleted the release-fix-task-list branch June 23, 2022 16:30
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.

2 participants