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

dtiplayground to 0.5.8b6 ImportError Report module - PDF creation #60

Open
aleramp88 opened this issue Mar 15, 2024 · 4 comments
Open

Comments

@aleramp88
Copy link

aleramp88 commented Mar 15, 2024

Dear maintainers, thank you for resolving my previous issue. I am now on the newer version of dtiplayground as you suggested, and it runs. However, I get this error while running a protocol containing 1) slice check 2) interlace check 3) eddy correction 4) qc report generation. For what I can understand ,the run finishes and produces the files. I cannot determine the gravity of this issue.
This happens after eddymotion.

'[2024-03-14-22-00-10] Source Image (Previous output) loaded from memory (object id): 139834243360672
[2024-03-14-22-00-10] [DTIPlaygroundModule.initialize] Processed time : 0.12s
[2024-03-14-22-00-10] [DTIPlaygroundModule.run] begins ...
[2024-03-14-22-00-18] Exception occurred in runPipeline cannot import name 'ShowBoundaryValue' from 'reportlab.platypus.frames' (/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/reportlab/platypus/frames.py)
[2024-03-14-22-00-18] Traceback (most recent call last):
[2024-03-14-22-00-18] File "/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/dtiplayground/dmri/common/pipeline.py", line 460, in runPipeline
[2024-03-14-22-00-18] outres=m.run(opts,global_vars=self.global_variables)
[2024-03-14-22-00-18] File "/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/dtiplayground/dmri/common/init.py", line 83, in wrapper
[2024-03-14-22-00-18] res=func(*args,**kwargs)
[2024-03-14-22-00-18] File "/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/dtiplayground/dmri/common/module.py", line 416, in run
[2024-03-14-22-00-18] res=self.process(*args,**kwargs) ## main computation for user implementation
[2024-03-14-22-00-18] File "/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/dtiplayground/dmri/preprocessing/modules/QC_Report/QC_Report.py", line 43, in process
[2024-03-14-22-00-18] from xhtml2pdf import pisa
[2024-03-14-22-00-18] File "/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/xhtml2pdf/pisa.py", line 26, in
[2024-03-14-22-00-18] from xhtml2pdf.document import pisaDocument
[2024-03-14-22-00-18] File "/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/xhtml2pdf/document.py", line 26, in
[2024-03-14-22-00-18] from xhtml2pdf.context import pisaContext
[2024-03-14-22-00-18] File "/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/xhtml2pdf/context.py", line 30, in
[2024-03-14-22-00-18] from reportlab.platypus.frames import Frame, ShowBoundaryValue
[2024-03-14-22-00-18] ImportError: cannot import name 'ShowBoundaryValue' from 'reportlab.platypus.frames' (/home/rampininia94/anaconda3/envs/dtienv-py310/lib/python3.10/site-packages/reportlab/platypus/frames.py)'

@styner
Copy link
Member

styner commented Mar 15, 2024

It looks like this happened during the report creation, likely as it tries to create the pdf. Did you enable the pdf-option in the report module? We have been having issues with the pdf creation and this might be related to that. Can you disable the pdf option and try again?
If that works, please edit the title of the issue to something like "dtiplayground to 0.5.8b6 ImportError Report module - PDF creation", as I do not anticipate this will be a quick fix, so this issue might stick around for a bit

@styner
Copy link
Member

styner commented Mar 15, 2024

the module uses xhtml2pdf for pdf report creation, which in turn uses reportlab and the newest version of reportlab breaks xhtml2pdf (currently a known issue). If pdf creation is needed, moving to an earlier version of reportlab might fix the problem.

@aleramp88 aleramp88 changed the title dtiplayground to 0.5.8b6 ImportError: cannot import name 'ShowBoundaryValue' from 'reportlab.platypus.frames' dtiplayground to 0.5.8b6 ImportError Report module - PDF creation Mar 15, 2024
@aleramp88
Copy link
Author

Hello, thanks again! Title: fixed.
Run without pdf creation: performed and finished without error, from GUI and from terminal.
Good luck for the fix :)

@styner
Copy link
Member

styner commented Aug 26, 2024

We were trying to recreate this error with the newest distribution, and were unable to do so. The pdf reporting seems to work without error now. My guess this is due to new versions of xhtml2pdf and reportlab. Please recreate the error on your end, or we can close this issue

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