-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'MaterialMap' has no attribute '__annotations__' #1
Labels
wontfix
This will not be worked on
Comments
Thanks for letting me know. I'm not sure. it *should* be working. I'll have
a look tonight.
Which version of python are you using? Anchorscad makes heavy use of
dataclasses and that's changed somewhat. Come to think of it,
__anotations__ is Python's place to put annotation metadata. Unless that's
now changed (maybe but I think unlikely) it probably means you need a more
recent version of Python. __anotations__ is used in a couple of places,
including the datatrees module to check the override field state which is
what seems to be happening here.
On an aside, totally won't fix your issue:
I've recently (like yesterday) rehashed this stuff and added Part support
- (i.e. the pair Part and Material). The MaterialMap has changed. The idea
is the you can associate a "part" name and priority and material and
priority and it will create multiple .scad files, one for each part and one
for "all". All this should not be affecting the stable to master branches.
If you're interested in looking at the most recent stuff (still working on
a few fixes but it builds all the modules bar 2 seem to work, checkout the
dev-fobm-pmc
<https://github.com/owebeeone/anchorscad/tree/dev-fobm-pmc> branch. You'll
need the latest (master) pythonopenscad branch too.
…On Fri, Aug 23, 2024 at 10:56 AM Zachary Streeter ***@***.***> wrote:
Hi there!
Looking forward to using this project to start creating some CAD projects!
Really appreciate your effort!
I followed the install instructions and tried out the verification step
but resulted in the following error
File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/extrude.py", line 13, in <module>
import anchorscad.core as core
File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/__init__.py", line 2, in <module>
from .core import *
File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/core.py", line 273, in <module>
class MaterialMap:
File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/datatrees.py", line 959, in wrap
return _process_datatree(
File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/datatrees.py", line 876, in _process_datatree
if OVERRIDE_FIELD_NAME in clz.__annotations__:
AttributeError: type object 'MaterialMap' has no attribute '__annotations__'
Looks like the clz class isn't being initialized correctly or something.
I'm also seeing this on the stable branch as well so I'm thinking this is
on my side. Any advice would be appreciated!
—
Reply to this email directly, view it on GitHub
<#1>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACZQHMZ6QKV4KSTKJSUFO3ZS2CDTAVCNFSM6AAAAABM7GAQESVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DEMBTHE2TQOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi Zachary,
https://docs.python.org/3/howto/annotations.html describes how to use
__annotations__ which makes this an official Python API for classes (and
other things) since Python 3.0.
That would mean you're likely using Python 2.x which is not supported by
AnchorSCAD. Sometimes both Python 2x and 3x are installed at the same time.
Python 3.x can usually be accessed using the python3 command. See if that
works for you.
Best Regards
g
…On Fri, Aug 23, 2024 at 4:18 PM Gianni Mariani ***@***.***> wrote:
Thanks for letting me know. I'm not sure. it *should* be working. I'll
have a look tonight.
Which version of python are you using? Anchorscad makes heavy use of
dataclasses and that's changed somewhat. Come to think of it,
__anotations__ is Python's place to put annotation metadata. Unless that's
now changed (maybe but I think unlikely) it probably means you need a more
recent version of Python. __anotations__ is used in a couple of places,
including the datatrees module to check the override field state which is
what seems to be happening here.
On an aside, totally won't fix your issue:
I've recently (like yesterday) rehashed this stuff and added Part support
- (i.e. the pair Part and Material). The MaterialMap has changed. The idea
is the you can associate a "part" name and priority and material and
priority and it will create multiple .scad files, one for each part and one
for "all". All this should not be affecting the stable to master branches.
If you're interested in looking at the most recent stuff (still working on
a few fixes but it builds all the modules bar 2 seem to work, checkout the
dev-fobm-pmc
<https://github.com/owebeeone/anchorscad/tree/dev-fobm-pmc> branch.
You'll need the latest (master) pythonopenscad branch too.
On Fri, Aug 23, 2024 at 10:56 AM Zachary Streeter <
***@***.***> wrote:
> Hi there!
>
> Looking forward to using this project to start creating some CAD
> projects! Really appreciate your effort!
>
> I followed the install instructions and tried out the verification step
> but resulted in the following error
>
> File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/extrude.py", line 13, in <module>
> import anchorscad.core as core
> File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/__init__.py", line 2, in <module>
> from .core import *
> File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/core.py", line 273, in <module>
> class MaterialMap:
> File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/datatrees.py", line 959, in wrap
> return _process_datatree(
> File "/home/zstreet/Documents/Repos/anchorscad/src/anchorscad/datatrees.py", line 876, in _process_datatree
> if OVERRIDE_FIELD_NAME in clz.__annotations__:
> AttributeError: type object 'MaterialMap' has no attribute '__annotations__'
>
> Looks like the clz class isn't being initialized correctly or something.
>
> I'm also seeing this on the stable branch as well so I'm thinking this is
> on my side. Any advice would be appreciated!
>
> —
> Reply to this email directly, view it on GitHub
> <#1>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AACZQHMZ6QKV4KSTKJSUFO3ZS2CDTAVCNFSM6AAAAABM7GAQESVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DEMBTHE2TQOI>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there!
Looking forward to using this project to start creating some CAD projects! Really appreciate your effort!
I followed the install instructions and tried out the verification step but resulted in the following error
Looks like the clz class isn't being initialized correctly or something.
I'm also seeing this on the stable branch as well so I'm thinking this is on my side. Any advice would be appreciated!
The text was updated successfully, but these errors were encountered: