Error: Inconsistent use of tabs and spaces in indentation
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Error: Inconsistent use of tabs and spaces in indentation
I just downloaded the latest of 0.19. I am drawing a sheet metal by using Part Design WB first. Then, as soon as I switch to Sheet Metal WB, I get the error in the subject for (SheetMetalCmd.py, line 444). I think this is Python 3 issue, because I don't get any errors with V0.17.
Moreover, when I first start V0.19, I immediately get an error message:
During initialization the error "inconsistent use of tabs and spaces in indentation (<string>, line 71)" occurred in C:\Users\owner\AppData\Roaming\FreeCAD\Mod\exploded_animation\InitGui.py
Any comments?
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git)
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Moreover, when I first start V0.19, I immediately get an error message:
During initialization the error "inconsistent use of tabs and spaces in indentation (<string>, line 71)" occurred in C:\Users\owner\AppData\Roaming\FreeCAD\Mod\exploded_animation\InitGui.py
Any comments?
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git)
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
- Attachments
-
- SheetMetalError1.png (4.06 KiB) Viewed 1817 times
Re: Error: Inconsistent use of tabs and spaces in indentation
A bit unfortunate that these things sneaks in. Py3 is pickier than py2 on allowing tabs as indent.
Good news is that it's an easy fix you can/should even do yourself when it's broken.
Just delete the tabs and replace it with spaces to get the right indention and problem gone.
And you have a perfect instruction of which lines it has to be done for.
And then hope that someone takes care of it based on a post like this so you don't have to do it for every update you make.
Happy "cadding".
Good news is that it's an easy fix you can/should even do yourself when it's broken.
Just delete the tabs and replace it with spaces to get the right indention and problem gone.
And you have a perfect instruction of which lines it has to be done for.
And then hope that someone takes care of it based on a post like this so you don't have to do it for every update you make.
Happy "cadding".
Re: Error: Inconsistent use of tabs and spaces in indentation
Did you update SheetMetal to the latest version?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Error: Inconsistent use of tabs and spaces in indentation
1- Updating the Sheet Metal WB solved the problem. However, as I mentioned initially, I did a fresh download & install of V0.19. Therefore, I assumed that all the files (WBs, macros, etc) were fresh, up to date. Now, I know they are not. So, it is a good practice to check updates of all the WBs and macros after the first install of a new version.
2- I edited the file and removed all the TABs in the .py file, only to get a new warning. Here are all the warning messages:
13:02:30 During initialization the error "unindent does not match any outer indentation level (<string>, line 71)" occurred in C:\Users\owner\AppData\Roaming\FreeCAD\Mod\exploded_animation\InitGui.py <------ No TABs at all in this line (71)!
13:02:30 Please look into the log file for further information <----- Cannot find such a file anywhere! Searched the whole drive!
13:02:39 Cannot find icon: :/icons/Sketcher_EditSketch.svg <------- Searched the internet, no such icons to download. It is not in the DIRs.
13:02:39 Cannot find icon: :/icons/Sketcher_LeaveSketch.svg <------- " " "
EDIT: Removed all the indentations from line 71 down. Finally the warning message is gone! Now, only those two yellow SVG warnings remaining to solve.
Thanks
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git)
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
2- I edited the file and removed all the TABs in the .py file, only to get a new warning. Here are all the warning messages:
13:02:30 During initialization the error "unindent does not match any outer indentation level (<string>, line 71)" occurred in C:\Users\owner\AppData\Roaming\FreeCAD\Mod\exploded_animation\InitGui.py <------ No TABs at all in this line (71)!
13:02:30 Please look into the log file for further information <----- Cannot find such a file anywhere! Searched the whole drive!
13:02:39 Cannot find icon: :/icons/Sketcher_EditSketch.svg <------- Searched the internet, no such icons to download. It is not in the DIRs.
13:02:39 Cannot find icon: :/icons/Sketcher_LeaveSketch.svg <------- " " "
EDIT: Removed all the indentations from line 71 down. Finally the warning message is gone! Now, only those two yellow SVG warnings remaining to solve.
Thanks
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git)
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Re: Error: Inconsistent use of tabs and spaces in indentation
Where do you get "exploded_animation" I don't see it in Addons-manager?
"fight the good fight"
Re: Error: Inconsistent use of tabs and spaces in indentation
The addons are third party software provided by eager community members. FreeCAD doesn't know about them until it is started and thus the update process doesn't handle them.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Error: Inconsistent use of tabs and spaces in indentation
[/quote]
Where do you get "exploded_animation" I don't see it in Addons-manager?
[/quote]
In my PC, it is here:
C:\Users\owner\AppData\Roaming\FreeCAD\Mod\exploded_animation
But, I couldn't find the location of ":icons".
There are a bunch of "icons" DIRs in most of the Mod's sub-DIRs. I copied 2 "made-up" SVG files to all of the icons DIRs under Mod, but still get the warnings:
Cannot find icon: :/icons/Sketcher_EditSketch.svg
Cannot find icon: :/icons/Sketcher_LeaveSketch.svg
Where do you get "exploded_animation" I don't see it in Addons-manager?
[/quote]
In my PC, it is here:
C:\Users\owner\AppData\Roaming\FreeCAD\Mod\exploded_animation
But, I couldn't find the location of ":icons".
There are a bunch of "icons" DIRs in most of the Mod's sub-DIRs. I copied 2 "made-up" SVG files to all of the icons DIRs under Mod, but still get the warnings:
Cannot find icon: :/icons/Sketcher_EditSketch.svg
Cannot find icon: :/icons/Sketcher_LeaveSketch.svg
Re: Error: Inconsistent use of tabs and spaces in indentation
I see that. After some Duckcuck Go it looks like this is the precursor to " Exploded Assembly" https://github.com/JMG1/ExplodedAssembl ... b7952d15c6
I've installed this via Tools > Addon manager
and it installs and loads with no errors
"fight the good fight"
Re: Error: Inconsistent use of tabs and spaces in indentation
I have no problem with Exploded_Animation anymore.
And, I already have the Exploded_Assembly. It came with the installation. However, I cannot update it. Well, when I do, the Start Screen complains as "already installed", meaning that I installed it over the original (now have 2 copies on top of each other)! I deleted the update, and everything went back to normal (with the original intact). I cannot remove the original either (to get a fresh update). It says "Unable to remove this addon".
So, the mystery goes on with those 2 icons..
And, I already have the Exploded_Assembly. It came with the installation. However, I cannot update it. Well, when I do, the Start Screen complains as "already installed", meaning that I installed it over the original (now have 2 copies on top of each other)! I deleted the update, and everything went back to normal (with the original intact). I cannot remove the original either (to get a fresh update). It says "Unable to remove this addon".
So, the mystery goes on with those 2 icons..
Re: Error: Inconsistent use of tabs and spaces in indentation
They from an addon, which one?
I suggest you rename C:\Users\owner\AppData\Roaming\FreeCAD\Mod to C:\Users\owner\AppData\Roaming\FreeCAD\Mod-backupC:\Users\owner\AppData\Roaming\FreeCAD\Mod\exploded_animation
And use Tools > Addon manager to re-install your needed addon wb's.
You may also need to rename C:\Users\owner\AppData\Roaming\FreeCAD\user.cfg and
C:\Users\owner\AppData\Roaming\FreeCAD\system.cfg
At next restart FreeCAD will create new ones. WARNING: prefs will be lost, so rename don't delete, so we can revert if necessary.
"fight the good fight"