Closed perfessor101 closed 4 years ago
Can't help without more info, but in case its not clear, you need to run the script after its installed. Installing it should just make it appear in the list of scripts.
So, I just tried this, and I'd run the script, and literally nothing would happen.
I decided to "manually" copy the script into the command area, and I got to this point:
from dataclasses import dataclass
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'dataclasses'
So it's likely failing at this point, and not throwing any error messages.
A little more info:
import sys
sys.version
3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 08:49:46) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
I'm not sure where 3.5.3 is coming from, as I only have 3.4, 3.6, 3.7 installed.
Also, dataclasses was added in 3.7 (https://docs.python.org/3/library/dataclasses.html) which explains why it fails w/ Python 3.5.
I've made a number of changes to make it Python 3.5 compatible, but now I'm not sure how to handle NamedTuple:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/jmg/github/Fusion360Exporter/foo.py", line 5, in test
exec(data)
File "<string>", line 41, in <module>
File "/Users/jmg/Library/Application Support/Autodesk/webdeploy/production/1d09d44697aca8134bfd0a02c1326040d3faf96a/Autodesk Fusion 360.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.5/typing.py", line 1916, in __new__
raise TypeError("Class syntax for NamedTuple is only supported"
TypeError: Class syntax for NamedTuple is only supported in Python 3.6+
I'm using this module:
def test():
with open('/Users/jmg/github/Fusion360Exporter/Exporter.py') as fp:
data = fp.read()
exec(data)
To be able to get useful error messages from Fusion360. I'll be putting up my changes shortly.
Sorry it doesn’t appear in the list of scripts in fusion 360 I add it ... and it doesn’t add Repeat Still not in fusion 360’s add-ins
Do I run it from the directory it’s in manually ?
Sent from my iPhone
On Sep 27, 2020, at 3:37 PM, John-Mark Gurney notifications@github.com wrote:
A little more info:
import sys
sys.version 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 08:49:46) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] I'm not sure where 3.5.3 is coming from, as I only have 3.4, 3.6, 3.7 installed.
Also, dataclasses was added in 3.7 (https://docs.python.org/3/library/dataclasses.html) which explains why it fails w/ Python 3.5.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
ok, that is different than the issue I am having. I will be creating a new issue to track my problem.
For me, when I added the script, via clicking on the green +, and showing the directory w/ the files in it (Export.py), then I clicked open, and it now is is listed as Exporter under My Scripts.
@perfessor101 no, the script gets run from within Fusion. I'm not sure I'll be of much help debugging this
Hello, I tried installing this twice ... downloaded zip file extracted to a directory went to add-ins, scripts and add-ins, selected add-ins, clicked the green + sign, pasted the name of the extracted directory clicked select folder and then nothing
Fusion 360 updated September 26th