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

Crash on movefile in publishPrepReport #23

Closed
GregPerlman opened this issue Aug 28, 2020 · 4 comments
Closed

Crash on movefile in publishPrepReport #23

GregPerlman opened this issue Aug 28, 2020 · 4 comments

Comments

@GregPerlman
Copy link

Prepline 0.55 crashes during publishPrepReport, whether I specify additional parameters or not (e.g., use all defaults).

One example of parameters that leads to a crash:
'summaryFilePath', strcat('C:\Users\data', filename, '_PREP.html') ,...
'sessionFilePath', strcat('C:\Users\data', filename, '_PREP.pdf') ,...
'consoleID', 1,...
'publishOn', true);

In any test runs, Matlab credits line 73 of publishPrepReport: "movefile(tempReportLocation, sessionReportLocation);" for the error.

The code will run to completion if I comment out that line or if I set relativeReportLocation (line 48) equal to sessionFilePath. However, only the .html file will be properly named. The .PDF will only be named "prepReport" and is overwritten if more than 1 subject is processed in a loop.

@VisLab
Copy link
Owner

VisLab commented Aug 28, 2020

'summaryFilePath', strcat('C:\Users\data', filename, '_PREP.html')

Isn't this trying to write to C:\Users with file name dataxxx_PREP.html. You can't directly write to Users usually.

@GregPerlman
Copy link
Author

GregPerlman commented Aug 28, 2020

I was working from my Home PC (no admin issues when writing to Users.). I also tried other paths, but it gave same error. It gave same error when i provided no paths (it would use defaults?).

@VisLab
Copy link
Owner

VisLab commented Aug 29, 2020

My point was that your summaryFilePath was missing a file separator character. You can't write to C:\Users directly without specifically running as administrator in the usual setup even if it is your home PC. Make sure that you have a correct path by putting an explicit path in the call and creating a file outside of PREP to make sure that the exact file name you are writing to can be written to.

@VisLab
Copy link
Owner

VisLab commented Aug 29, 2020

You have to provide a path for the reports. There is no default for this. Thanks

@VisLab VisLab closed this as completed May 2, 2021
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

No branches or pull requests

2 participants