BUG? "During initialization the error "[WinError 1] Incorrect function:"

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
Smiling_user
Posts: 196
Joined: Tue Jul 28, 2020 7:31 am

BUG? "During initialization the error "[WinError 1] Incorrect function:"

Post by Smiling_user »

What does this mean?

Code: Select all

14:39:38  _.__name__
                )
            )
        
    @staticmethod
    def getToolTip
14:39:38  PointIdentityConstraint
14:39:38  PointOnLineConstraint
14:39:38  PointOnPlaneConstraint
14:39:38  CircularEdgeConstraint
14:39:38  AxialConstraint
14:39:38  AxisParallelConstraint
14:39:38  AxisPlaneParallelConstraint
14:39:38  AxisPlaneAngleConstraint
14:39:38  AxisPlaneNormalConstraint
14:39:38  PlanesParallelConstraint
14:39:38  PlaneConstraint
14:39:38  AngledPlanesConstraint
14:39:38  SphericalConstraint
14:39:38  CenterOfMassConstraint
14:39:38  ***********************************************************************
#*                                                                         *
#*   Copyright 
14:39:38  _.__name__
                )
            )
        
    @staticmethod
    def getToolTip
14:39:38  PointIdentityConstraint
14:39:38  PointOnLineConstraint
14:39:38  PointOnPlaneConstraint
14:39:38  CircularEdgeConstraint
14:39:38  AxialConstraint
14:39:38  AxisParallelConstraint
14:39:38  AxisPlaneParallelConstraint
14:39:38  AxisPlaneAngleConstraint
14:39:38  AxisPlaneNormalConstraint
14:39:38  PlanesParallelConstraint
14:39:38  PlaneConstraint
14:39:38  AngledPlanesConstraint
14:39:38  SphericalConstraint
14:39:38  CenterOfMassConstraint
14:39:38  ***********************************************************************
#*                                                                         *
#*   Copyright 
14:39:42  flag
14:39:42  flag2
14:39:54  ('Mod/Pyramids_and_polyhedrons', 'Mod/Pyramids-and-Polyhedrons', 'Mod/FreeCAD-Pyramids-and-Polyhedrons', 'Mod/Pyramids-and-polyhedrons')
14:40:13  During initialization the error "[WinError 1] Incorrect function: 'Z:\\FreeCAD0.20'" occurred in freecad.extman
14:40:13  --------------------------------------------------------------------------------
14:40:13  Traceback (most recent call last):
  File "<string>", line 154, in InitApplications
  File "Z:\FreeCAD0.20\bin\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "Z:\FreeCAD0.20\FreeCAD\Mod\ExtMan\freecad\extman\__init__.py", line 119, in <module>
    __freecad_home_path__ = Path(App.getHomePath()).resolve()
  File "Z:\FreeCAD0.20\bin\lib\pathlib.py", line 1181, in resolve
    s = self._flavour.resolve(self, strict=strict)
  File "Z:\FreeCAD0.20\bin\lib\pathlib.py", line 206, in resolve
    s = self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 1] Incorrect function: 'Z:\\FreeCAD0.20'
14:40:13  --------------------------------------------------------------------------------
14:40:29  Cannot find icon: /Resources/icons/Maker_workbench_icon.svg
OS: Windows 7 SP 1 (6.1)
Word size of FreeCAD: 64-bit
Version: 0.20.25943 (Git)
Build type: Release
Branch: master
Hash: a65464b722a846bd2999aa2fecdff1132b15b297
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
User avatar
sepp2gl
Posts: 5
Joined: Thu Feb 17, 2022 8:47 am

Re: BUG? "During initialization the error "[WinError 1] Incorrect function:"

Post by sepp2gl »

...no reply to this thread?
I see this message "Cannot find icon: /Resources/icons/Maker_workbench_icon.svg" in quite a lot different contexts.
With my installaton this message comes first with every startup of FreeCAD.
After this it also occurs, when I load any design.

The path "/Ressources/Icons/..." seems to be an absolute path.
Might this be the root cause of the error?

The creator of this thread seems to have a Windows-system running,
I work with an OpenSuSE 15.2
...alles bleibt besser ;)
chrisb
Veteran
Posts: 53925
Joined: Tue Mar 17, 2015 9:14 am

Re: BUG? "During initialization the error "[WinError 1] Incorrect function:"

Post by chrisb »

sepp2gl wrote: Mon Apr 25, 2022 5:12 pm I see this message
And which is your version?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: BUG? "During initialization the error "[WinError 1] Incorrect function:"

Post by Roy_043 »

I confirm the icon error for the Maker WB. But this is not the original problem I think.
User avatar
sepp2gl
Posts: 5
Joined: Thu Feb 17, 2022 8:47 am

Re: BUG? "During initialization the error "[WinError 1] Incorrect function:"

Post by sepp2gl »

@chrisb: my version is 0.19
I always have the latest release from OpenSuSE repositories.
If I recall correctly, the error first occurred with 0.19.
...alles bleibt besser ;)
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: BUG? "During initialization the error "[WinError 1] Incorrect function:"

Post by adrianinsaval »

sepp2gl wrote: Tue Apr 26, 2022 5:45 pm @chrisb: my version is 0.19
I always have the latest release from OpenSuSE repositories.
If I recall correctly, the error first occurred with 0.19.
That's not proper version information, read the instructions in the link in the red banner above and provide full freecad info when asking for help.

You should probably report this to the maker wb devs instead (make sure to test with their latest version before) as that's the one giving you trouble, I doubt it's related to the errors in the OP
https://github.com/URJCMakerGroup/MakerWorkbench
User avatar
sepp2gl
Posts: 5
Joined: Thu Feb 17, 2022 8:47 am

Re: BUG? "During initialization the error "[WinError 1] Incorrect function:"

Post by sepp2gl »

@adrianinsaval:
...got it:
OS: openSUSE Leap 15.3 (KDE//usr/share/xsessions/plasma5)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.Unknown
Build type: Release
Python version: 3.6.13
Qt version: 5.12.7
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)

The version, that has been installed by Yast is 0.19.4-lp153.162.1

For me the issue is solve by brute force:
1. I renamed my FreeCAD-settings directory to .FreeCAD_bak
2. I deleted my installation and reinstalled it
No error message left.

Now I will step-by step reinstall the macros and add-on's, that I had before.
I guess, some of the FC-macros of the add-ons have been corrupted or were incompatible with version 0.19

P.S.: even the look of the GUI has changed now (so the defect InitGui.py definitely had an effect)
...alles bleibt besser ;)
Post Reply