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

[1.0 Bughunt] CAM - Prefs massive errors output #114

Closed
2 tasks done
spanner888 opened this issue Jul 7, 2024 · 6 comments
Closed
2 tasks done

[1.0 Bughunt] CAM - Prefs massive errors output #114

spanner888 opened this issue Jul 7, 2024 · 6 comments
Assignees

Comments

@spanner888
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Attempting to Edit - Prefs - CAM - Job Prefs - Post Processor and clicking in any edit field produces large error report.\

That's all, no actual changes to prefs, although errors seem to take a few seconds to show.

Drop down does not seem to trigger.
There might be other ways to trigger, not sure, but above seems reliable way to trigger errors.

08:59:36 Migrating Start Workbench to Start command... done. 09:00:28 Traceback (most recent call last): 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 346, in setProcessorListTooltip 09:00:28 self.setPostProcessorTooltip(self.form.postProcessorList, item.text(), "") 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 339, in setPostProcessorTooltip 09:00:28 processor = self.getPostProcessor(name) 09:00:28 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 333, in getPostProcessor 09:00:28 processor = PostProcessor.load(name) 09:00:28 ^^^^^^^^^^^^^^^^^^ 09:00:28 AttributeError: type object 'PostProcessor' has no attribute 'load' 09:00:28 Traceback (most recent call last): 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 346, in setProcessorListTooltip 09:00:28 self.setPostProcessorTooltip(self.form.postProcessorList, item.text(), "") 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 339, in setPostProcessorTooltip 09:00:28 processor = self.getPostProcessor(name) 09:00:28 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 333, in getPostProcessor 09:00:28 processor = PostProcessor.load(name) 09:00:28 ^^^^^^^^^^^^^^^^^^ 09:00:28 AttributeError: type object 'PostProcessor' has no attribute 'load' 09:00:28 Traceback (most recent call last): 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 346, in setProcessorListTooltip 09:00:28 self.setPostProcessorTooltip(self.form.postProcessorList, item.text(), "") 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 339, in setPostProcessorTooltip 09:00:28 processor = self.getPostProcessor(name) 09:00:28 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 333, in getPostProcessor 09:00:28 processor = PostProcessor.load(name) 09:00:28 ^^^^^^^^^^^^^^^^^^ 09:00:28 AttributeError: type object 'PostProcessor' has no attribute 'load' 09:00:28 Traceback (most recent call last): 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 346, in setProcessorListTooltip 09:00:28 self.setPostProcessorTooltip(self.form.postProcessorList, item.text(), "") 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 339, in setPostProcessorTooltip 09:00:28 processor = self.getPostProcessor(name) 09:00:28 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 333, in getPostProcessor 09:00:28 processor = PostProcessor.load(name) 09:00:28 ^^^^^^^^^^^^^^^^^^ 09:00:28 AttributeError: type object 'PostProcessor' has no attribute 'load' 09:00:28 Traceback (most recent call last): 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 346, in setProcessorListTooltip 09:00:28 self.setPostProcessorTooltip(self.form.postProcessorList, item.text(), "") 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 339, in setPostProcessorTooltip 09:00:28 processor = self.getPostProcessor(name) 09:00:28 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 09:00:28 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 333, in getPostProcessor 09:00:28 processor = PostProcessor.load(name) 09:00:28 ^^^^^^^^^^^^^^^^^^ 09:00:28 AttributeError: type object 'PostProcessor' has no attribute 'load' 09:00:29 Traceback (most recent call last): 09:00:29 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 346, in setProcessorListTooltip 09:00:29 self.setPostProcessorTooltip(self.form.postProcessorList, item.text(), "") 09:00:29 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 339, in setPostProcessorTooltip 09:00:29 processor = self.getPostProcessor(name) 09:00:29 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 09:00:29 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 333, in getPostProcessor 09:00:29 processor = PostProcessor.load(name) 09:00:29 ^^^^^^^^^^^^^^^^^^ 09:00:29 AttributeError: type object 'PostProcessor' has no attribute 'load' 09:00:30 Traceback (most recent call last): 09:00:30 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 346, in setProcessorListTooltip 09:00:30 self.setPostProcessorTooltip(self.form.postProcessorList, item.text(), "") 09:00:30 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 339, in setPostProcessorTooltip 09:00:30 processor = self.getPostProcessor(name) 09:00:30 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 09:00:30 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 333, in getPostProcessor 09:00:30 processor = PostProcessor.load(name) 09:00:30 ^^^^^^^^^^^^^^^^^^ 09:00:30 AttributeError: type object 'PostProcessor' has no attribute 'load' 09:00:30 Traceback (most recent call last): 09:00:30 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 346, in setProcessorListTooltip 09:00:30 self.setPostProcessorTooltip(self.form.postProcessorList, item.text(), "") 09:00:30 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 339, in setPostProcessorTooltip 09:00:30 processor = self.getPostProcessor(name) 09:00:30 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 09:00:30 File "/tmp/.mount_FreeCAyYeRI5/usr/Mod/CAM/Path/Main/Gui/PreferencesJob.py", line 333, in getPostProcessor 09:00:30 processor = PostProcessor.load(name) 09:00:30 ^^^^^^^^^^^^^^^^^^ 09:00:30 AttributeError: type object 'PostProcessor' has no attribute 'load'

Full version info

OS: Debian GNU/Linux 12 (bookworm) (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38043 (Git) AppImage
Build type: Release
Branch: main
Hash: 561e521817034ea7660de987d8ab7183ad583595
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/Australia (en_AU)

Subproject(s) affected?

CAM/Path

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@spanner888 spanner888 changed the title CAM - Prefs massive errors output [1.0 Bughunt] CAM - Prefs massive errors output Jul 8, 2024
@sliptonic
Copy link

I'm unable to duplicate the problem. However, I saw something very similar under specific conditions. I had my macro path pointing to another directory on the system. I had some old experimental posts in that directory.

The path preference system looks for valid post processors in several places including the macro directory. Is it possible you have old stale post processors someplace in the search path?

I'm going to close the issue since I can't duplicate it but will reopen if we can find a reproducible case.

@spanner888
Copy link
Author

Thanks for looking at this.

Your feedback gave me clues and I think the issue is not as I described, but actually triggered by mouse over the post processor list in prefs.

First up apologies as I only tested this in FreeCAD & forgot to test under Ondsel, which as you noted does not show this error.

In FreeCAD, the error appears to be due to missing
PostProcessor.load(name)
in Mod/CAM/Path/Post/Processor.py, which is STILL present in Ondsel.

Mouse over the post processor list in prefs triggers setPostProcessorTooltip, which calls getPostProcessor and then attempts: processor = PostProcessor.load(name)

But load(name) no longer exists (did check FC 19 where still was present), guess recent postprocess or Path to CAM refactoring removed this.

    def getPostProcessor(self, name):
        if not name in self.processor:
            processor = PostProcessor.load(name)
            self.processor[name] = processor
            return processor
        return self.processor[name]

    def setPostProcessorTooltip(self, widget, name, default):
        processor = self.getPostProcessor(name)
        if processor.tooltip:
            widget.setToolTip(processor.tooltip)
        else:
            widget.setToolTip(default)

I am open to your suggestions on next steps - eg raise issue in FreeCAD, but was looking for your feedback and especially to see if there are other differences between Ondsel and FreeCAD (both recent weekly dev versions), that might need followup.

@spanner888
Copy link
Author

Issue also in:
'[code]
OS: Debian GNU/Linux 12 (bookworm) (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.21.2.33771 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.21.2)
Hash: b9bfa5c
Python 3.10.13, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.6, OCC 7.6.3
Locale: English/Australia (en_AU)
Installed mods:

  • btl 0.9.9 (Disabled)
    [/code]
    '

@sliptonic
Copy link

confirmed.

@sliptonic sliptonic reopened this Jul 20, 2024
@sliptonic sliptonic self-assigned this Jul 20, 2024
sliptonic added a commit that referenced this issue Jul 20, 2024
The refactored postprocessor system uses
a factory to load scripts.  The preference
system has logic to load the scripts to get the tooltips
That logic was overlooked during the refactor.
Added it here.
@sliptonic
Copy link

FreeCAD#15537

chennes pushed a commit to FreeCAD/FreeCAD that referenced this issue Jul 22, 2024
The refactored postprocessor system uses
a factory to load scripts.  The preference
system has logic to load the scripts to get the tooltips
That logic was overlooked during the refactor.
Added it here.
@sliptonic
Copy link

merged

looooo pushed a commit to looooo/FreeCAD that referenced this issue Aug 21, 2024
The refactored postprocessor system uses
a factory to load scripts.  The preference
system has logic to load the scripts to get the tooltips
That logic was overlooked during the refactor.
Added it here.
aiksiongkoh pushed a commit that referenced this issue Sep 4, 2024
The refactored postprocessor system uses
a factory to load scripts.  The preference
system has logic to load the scripts to get the tooltips
That logic was overlooked during the refactor.
Added it here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants