Giter VIP home page Giter VIP logo

freecad-pluginloader's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freecad-pluginloader's Issues

Problems executing some plugins

I struggle to run some plugins after installation.

Screewmaker fights with pluginloader for screen space and does not seam to be able to make screews.

workfeature does not start for me unless i move contents of Mod/plugins/WorkFeature/WorkFeature/ to Mod/plugins/WorkFeature

Joinfeatures is in Master now, when installed in current master this messes up Part module and crashes it if switched to part. Should be removed or handled somehow.

PCB does not install: references to fixed folder source:/home/thomas/tmp/PCB!

Symbollib
Does not look ready for auto install and configure
Looks like it installs fine, but fails on run with:
fn="/usr/lib/freecad/Mod/plugins/FreeCAD-symbols/SymbolsLibrary.FCMacro";exec open(fn).read()
File "", line 140, in
--> File "", line 92, in init
--> NameError: global name 'QtSvg' is not defined

Animation does not install properly. Downloaded, extracted but not installed.

PartLibrary Does not look ready for auto install and configure

CircularText Macro points to PartLibrary when run
fn="/usr/lib/freecad/Mod/plugins/FreeCAD-library/PartsLibrary.FCMacro";exec open(fn).read()

Perfect function.
Cura Engine Perfect install, Perfect run
ObjTree Perfect install, Perfect run
DrawingDim Perfect install, Perfect run
Exploded Animation Perfect install, Perfect run
Bolts Perfect install, Perfect run

TestPM
*****default Method FreeCAD-Dir=/usr/lib/freecad/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!

What is 'status.py'

'status.py' is referenced in 'myconfig.yaml' (in both Master & LocalDirs versions) yet appears nowhere else. Is this intended for some future expansion or is it something left from an earlier version that can be safely removed?
(Really, I just want to know the purpose of the enigmatic 'Sun & 'Mars' icons.)

Hardcoded userconfigfile

Getting this error-message during startup. Does not look like it is problematic but cutters terminal when looking for other problems.

Mod pluginloader InitGui.py starting ...
pluginmanager config file /usr/share/freecad//Mod/plugins/pluginloaderconfig.yaml
pluginmanager userconfig file /usr/lib/freecad/Mod/plugins/myconfig.yaml
userconfigfile not available
IOError: [Errno 2] No such file or directory: '/usr/lib/freecad/Mod/plugins/myconfig.yaml'

dict
{'menu test - cmd2': {'exec': 'import plugins;plugins.plugin1.p1.info1()'}, 'menu tes - fun': {'exec': 'FreeCAD.ActiveDocument.addObject("Part::Box","Box")'}, 'menu test - command1': {'exec': 'import plugins;plugins.plugin1.info2()'}}
{'author': 'noname',
'backup': '/usr/share/freecad/tmp/bak2_',
'description': 'no description',
'destdir': '/home/kjetil/.FreeCAD/Mod/testdir',
'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('*****default Method FreeCAD-Dir=/usr/share/freecad/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')",
'format': 'zipdir',
'icon': '/usr/share/freecad/Mod/plugins/icons/master.png',
'menu': 'defaults',
'method': 'zip',
'name': 'defaultName',
'source': 'https://github.com/microelly2/plugin_defaults/archive/master.zip',
'sourcedir': 'plugin_defaults-master',
'status': 'ignore',
'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'}
dict
{'files': ['dark-green.qss', 'dark-blue.qss', 'dark-orange.qss', 'light-green.qss', 'light-blue.qss', 'light-orange.qss'], 'pattern': '[PATH_TO_IMAGES]', 'data': 'UserAppData/Gui/Stylesheets/images'}
Mod pluginloader InitGui.py done
gentoolbars ...

2 changes to get started in Archlinux

I guess i could make pull request but I want your take on it.

Pluginloader starts and runs seemingly well on arch after these two changes. with one exception. Some plugins installed with it does not run. Will add specific issues for each problem I encounter

in pluginloader.py

def pathMacro(s):
'''
replace shortname by os path
'''
for k in ["UserHomePath","UserAppData","AppHomePath"]:
pat=r"(.)"+k+"/"+"(.)"
m = re.match(pat, s)
if m:
# m.group(0) # The entire match
pre=m.group(1)
post=m.group(2) # The first parenthesized subgroup.
inn=FreeCAD.ConfigGet(k)
if k == "AppHomePath": #Force sensible Plugin folder
if inn == "/usr/":
inn=inn+"share/freecad/"
if inn == "/usr/bin/":
inn="/usr/share/freecad/"
if k == "UserHomePath":
s2=pre+inn+"/"+post
else:
s2=pre+inn+post
s=s2
return s
line 136

fn=0 Commented this line. Had the feeling it was overwriting config.

Problem installing plugins

Hi, Just finished making a new PKBUILD that installs freecad the same way as ubuntu. but I am still having problems installing the plugins. My investigation have led me to be quite confused.
1)
In pluginloader.py
line 370 directory=zipextract+"/.."
line 379 os.makedirs(directory)
This does not make sense to me, whenever I try to test this in a python console i get error message that "OSError: [Errno 17] File exists: '/home/kjetil/testtes/..'"

In pluginloader.py line approx 460
os.rename(source, destination) this command does not work as long as source and destination are on the same physical partition. This makes problems when Home folder is on separate partition.

Trying to use shutil.move(), but it behaves differently if source is file or folder and if destination is empty or not.
adding a new "homedir" in yaml file and doing some shuffeling with foldernames i can get one by one plugin to install.
It requires messing and changing the yaml file for every plugin.

I do not understand why it works for you on Ubuntu and not for me on Arch.

What happens on your end if you run the following in ipython
import os
directory="/home/micronelly2/test"+"/.."
os.makedirs(directory)

Permissions problem within plugin-manager installr script

Hi
I received the following permissions error when trying to use the self installer script from within FreeCAD

/usr/lib/freecad//Mod/plugins/
Traceback (most recent call last):
File "/home/david/.FreeCAD/pluginManager_installer.py", line 42, in
st1()
File "/home/david/.FreeCAD/pluginManager_installer.py", line 34, in st1
os.makedirs(directory)
File "/usr/bin/../lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
<type 'exceptions.OSError'>: (13, 'Permission denied', '/usr/lib/freecad//Mod/plugins/')

OS: Linux Mint 17.2 Rafaela
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6131 (Git)
Build type: None
Branch: master
Hash: ed037c138ed010d09c8c554c13e06e05518f1bf5
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Iam logged in as a normal user not root. It appears that os.py is not able to request su permissions when needed.

Installed as per manual installation instructions - no problems. Appears in Menu->View->Panels rather than in Views
Cheers
David

Strange behavior with Screw maker macro

Now pluginmanager installs and runs fine.

I can install Freecad-macros and run all under My Tests.

Trying to install Screew Maker makro it installs to:

~/.FreeCAD/Macros/screw_maker.py/screw_maker.py

When trying to run it:

!fn="/home/kjetil/.FreeCAD/Macros/screw_maker1_7.py";exec open(fn).read()!
fn="/home/kjetil/.FreeCAD/Macros/screw_maker1_7.py";exec open(fn).read()
Traceback (most recent call last):
--> File "", line 73, in run
--> File "", line 1, in
--> IOError: [Errno 2] No such file or directory: '/home/kjetil/.FreeCAD/Macros/screw_maker1_7.py'

If i move screw_maker1_7.py to /home/kjetil/.FreeCAD/Macros/screw_maker1_7.py

it fails to run with the following output.

!fn="/home/kjetil/.FreeCAD/Macros/screw_maker1_7.py";exec open(fn).read()!
PySyde is used
fn="/home/kjetil/.FreeCAD/Macros/screw_maker1_7.py";exec open(fn).read()
Traceback (most recent call last):
--> File "", line 73, in run
--> File "", line 1, in
--> File "", line 2887, in
--> File "", line 2889, in screw
--> NameError: name 'Ui_ScrewMaker' is not defined

Symbols library refering to yorik's home folder

fn="/usr/share/freecad/Mod/plugins/FreeCAD-symbols/SymbolsLibrary.FCMacro";exec open(fn).read()!
Symbols library path /home/yorik/Sources/FreeCAD-symbolsnot found.
Please set the correct path to your symbols library in the macro script
done

References to private home folder

Some off refs. in pluginloader.py
line 426,427

os.system("cd /home/thomas/tmp; 7z x "+zipfilename+" PCB >/tmp/aa")
zipextract="/home/thomas/tmp/PCB"

Problem activating Assembly2Workbench

!FreeCADGui.activateWorkbench("Assembly2Workbench")!
FreeCADGui.activateWorkbench("Assembly2Workbench")
Traceback (most recent call last):
--> File "", line 73, in run
--> File "", line 1, in
--> KeyError: "No such workbench 'Assembly2Workbench'"
pluginloader started ...
super
pluginloader started ...
['loadtest', 'bolts', 'assembly animation dropbox', 'screw maker', 'sipoc', 'pcb', 'partlib', 'menutest2', 'assembly animation', 'FreeCAD-makros', 'assembly2', 'workfeature', 'curaengin', 'animation', 'defaulttest', 'circular text', 'symbollib', 'drawing dimensioning']
<pluginloader.MyWidget object at 0x7f960909d7a0>
widget shown
super ende
widget shown
assembly2
{'status': 'noignore', 'name': 'assembly2', 'author': 'hamish2914', 'menu': 'Assembly2 Workbench', 'description': 'Assembly Workbench in python', 'exec': 'FreeCADGui.activateWorkbench("Assembly2Workbench")', 'destdir': '/home/kjetil/.FreeCAD/Mod/assembly2', 'source': 'https://github.com/hamish2014/FreeCAD_assembly2/archive/master.zip', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp', 'format': 'zipdir', 'icon': '/usr/share/freecad/Mod/plugins/icons/assembly2.png', 'backup': '/home/kjetil/.FreeCAD/Mod/assembly2', 'method': 'zip', 'sourcedir': 'FreeCAD_assembly2-master'}
install or update assembly2
no local version info available
/home/kjetil/tmp/release
no web version info available
Local Version: 99999999999999999999999
Web Version :
Need Update 3
/home/kjetil/tmp/yyya
True
zipfile: /home/kjetil/tmp/yyya.zip
https://github.com/hamish2014/FreeCAD_assembly2/archive/master.zip
vor download
targetfile:/home/kjetil/tmp/yyya.zip
extrakts
/home/kjetil/tmp/yyya/FreeCAD_assembly2-master
/home/kjetil/.FreeCAD/Mod/assembly2
backup
move
destination:/home/kjetil/.FreeCAD/Mod/assembly2!
source:/home/kjetil/tmp/yyya/FreeCAD_assembly2-master!
done install
run done
!FreeCADGui.activateWorkbench("Assembly2Workbench")!
FreeCADGui.activateWorkbench("Assembly2Workbench")
Traceback (most recent call last):
--> File "", line 73, in run
--> File "", line 1, in
--> KeyError: "No such workbench 'Assembly2Workbench'"

pluginloaderconfig.yaml hardcoded path

Line 146 in pluginloader.py to #fn=0

This line when uncommented forces a hardcoded update of the folderlocation of pluginloaderconfig.jaml to be written to user.cfg.

so when I update the user.cfg to reflect the location of this file on my system it is put back to /usr/lib/..... next time I start freecad

Installation of the bolts macro

Hello

I can't install the bolts macro
I have an error opening

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

erreurbolts

How can I fix this problem

Kind regards

FMD14

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.