Issue with Publishing IFC app on VIKTOR

Hi everyone,

Iā€™m experiencing an issue with my app on Viktor.ai (VIKTOR). In my development workspace, the app runs correctly, and the IFC model displays as expected. However, after publishing the app, I am unable to view the IFC modelā€”it only displays an error message stating that ā€œsomething went wrong.ā€

Iā€™ve tried troubleshooting but havenā€™t been able to resolve the issue. Could anyone help me figure out whatā€™s going wrong?

Which tool versions are you using?

  • SDK: v14.19

  • Platform: ??

  • Python: v3.12

  • Isolation mode: ??

Current Behavior

  • After publishing, the app fails to display the IFC model and instead shows a generic error message: ā€œSomething went wrong.ā€

  • This issue only occurs in the published version; the development workspace works fine.

Expected Behavior

  • The published app should display the IFC model correctly, just like it does in the development workspace.

Context

These are the packages I use (requirements.txt)
ifcopenshell
pandas
ifctester
viktor

Hi @ecbilge ,

Thank you for reaching out. My first guess would be that it either runs into memory limits (the default given to developers is 0.5G), as this has been my experience with using ifcopenshell.

You could try using memory-profiler Ā· PyPI to do a profiling of your memory usage. Although not accurate, it could give an idea whether that might be the issue.

Looking into your case, it seems like it is failing after the progress message ā€œExporting fileā€. That would be a good place to start your investigation.

You could also consider trying to catch any error after that message by adding a try except statement around that code, and rasing the error as a UserError, which will present the error to you that will allow you to investigate it further. If the try except does not work, then it is most likely a memory error.

Marcel,

Thank you for your help. I tried using the memory profiler, and I believe it is not the issue. I have shared the projectā€™s GitHub page. If anyone has time to look at it, I would appreciate it.
eymenbilge/RuhsatPro_Viktor

Hi @ecbilge,

I sent you fix for the line of code that was causing the issue when publishing the app.

For the community I wanted to add the solution to this topic:
In the end it was not the IFC file causing an issue but the data part of the IFCandDataView.

Here an implementation of a file path which worked in local development did not work in the published app causing it to break only the published app.

By changing the path from:
ā€œmy_csv_file.csvā€
to:
"Path(file).parent / ā€œmy_csv_file.csvā€

we were able to resolve this and the app works.

Feel free to share your app in the Inspiration Gallery!

Thank you! Your fix worked perfectly. The issue was indeed with the file path in the published app, not the IFC file itself. Changing the path as you suggested resolved the problem, and the app is now functioning as expected.