[risolto] fasteners non funziona
Forum rules
regole del forum e le informazioni utili
Importante: PRIMA di chiedere aiuto leggete qui!
regole del forum e le informazioni utili
Importante: PRIMA di chiedere aiuto leggete qui!
[risolto] fasteners non funziona
ho freecad 0.18.04 32 bit con windows 7 professional ho installato manualmente la libreria fasteners compare nell'eleco a discesa ma quando clicco mi da (unknown dialect) e non si apre non posso usare addon manager perchè è un altro computer non collegato a internet chi mi può aiutare grazie
Last edited by henry1954 on Wed Apr 07, 2021 1:17 pm, edited 1 time in total.
Re: fasteners non funziona
Buongiorno henry1954 e alla Comunità!
Benvenuto!
Intanto di leggere qui https://forum.freecadweb.org/viewtopic. ... 8&t=56584;
una volta completata questa fase, scaricare il workbench che si vuole in formato “*.zip”
nel tuo caso qui: https://github.com/shaise/FreeCAD_FastenersWB
- cliccare su “Code”
- scegliere “Download zip”
scompattarlo e seguire le istruzioni qui https://wiki.freecadweb.org/Installing_ ... benches/it
l’immagine chiarisce la fase da fare.
Spero di averti aiutato a superare il problema.
Buona giornata.
- Attachments
-
- manu_instal_workb.png (58.27 KiB) Viewed 1524 times
Re: fasteners non funziona
grazie per la risposta ho seguito la procedura ma non funziona però sul portatile sempre con windows 7 ho la versione a 64 bit e funziona
Re: fasteners non funziona
Ecco l'errore che si genera al momento del caricamento del workbench Fasteners (installato manualmente)
unknown dialect
Traceback (most recent call last):
File "<string>", line 46, in Initialize
File "C:\Users\ad\AppData\Roaming\FreeCAD\Macro\Mod\Fasteners\FastenerBase.py", line 30, in <module>
from screw_maker import *
File "C:\Users\ad\AppData\Roaming\FreeCAD\Macro\Mod\Fasteners\screw_maker.py", line 136, in <module>
itemdict = csv2dict(itempath,fieldsnamed=True)
File "C:\Users\ad\AppData\Roaming\FreeCAD\Macro\Mod\Fasteners\screw_maker.py", line 116, in csv2dict
reader = csv.reader(data, skipinitialspace=True, dialect='unix', quoting=csv.QUOTE_NONNUMERIC)
vediamo se qualche esperto in Python trova la soluzione.
Re: fasteners non funziona
grazie attendo se qualche esperto mi può aiutare
Re: fasteners non funziona
Nel file screw_maker.py, sostituisci:
Code: Select all
import FreeCAD, FreeCADGui, Part, math, csv, os
from FreeCAD import Base
import DraftVecUtils
try:
from PySide import QtCore, QtGui
#FreeCAD.Console.PrintMessage("PySide is used" + "\n")
except:
#FreeCAD.Console.PrintMessage("PyQt4 is needed" + "\n")
from PyQt4 import QtCore, QtGui
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
DEBUG = False # set to True to show debug messages; does not work, still todo.
# import fastener data
__dir__ = os.path.dirname(__file__)
fsdatapath = os.path.join(__dir__, 'FsData')
# function to open a csv file and convert it to a dictionary
def csv2dict(filename, fieldsnamed=True):
data = open(filename, 'r')
reader = csv.reader(data, skipinitialspace=True, dialect='unix', quoting=csv.QUOTE_NONNUMERIC)
dictvar = {}
con:
Code: Select all
import FreeCAD, FreeCADGui, Part, math, csv, os, sys
from FreeCAD import Base
import DraftVecUtils
try:
from PySide import QtCore, QtGui
#FreeCAD.Console.PrintMessage("PySide is used" + "\n")
except:
#FreeCAD.Console.PrintMessage("PyQt4 is needed" + "\n")
from PyQt4 import QtCore, QtGui
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
DEBUG = False # set to True to show debug messages; does not work, still todo.
# import fastener data
__dir__ = os.path.dirname(__file__)
fsdatapath = os.path.join(__dir__, 'FsData')
# function to open a csv file and convert it to a dictionary
def csv2dict(filename, fieldsnamed=True):
data = open(filename, 'r')
if sys.maxsize > 2**32:
reader = csv.reader(data, skipinitialspace=True, dialect='unix', quoting=csv.QUOTE_NONNUMERIC)
else:
reader = csv.reader(data, skipinitialspace=True, quoting=csv.QUOTE_NONNUMERIC)
dictvar = {}
Re: fasteners non funziona
Buon pomeriggio alla Comunità!
Ciao Syres!
Ti ringrazio per la soluzione (non c’erano dubbi che sarebbe arrivata).
Confermo che la sostituzione del codice ha dato “frutto”, il workbench “Fastners” funziona perfettamente.
Per quanto attiene henry1954, allego il Wb modificato come indicato da Syres, devi eliminare quello eventualmente installato (tutta la cartella di Fastners) e installare, una volta scompattato, il modificato nella directory di windows 7 --> C:\Program Files\FreeCAD 0.18\Mod
- Attachments
-
- FreeCAD_FastenersWB-master.zip
- (803.27 KiB) Downloaded 62 times
Re: fasteners non funziona
grazie mille ho risolto (siete grandi)