bstaple1/MTGA_Draft_17Lands

Unable to start Main.py on Mac

Closed this issue · 4 comments

Hi. I'm unable to start main.py on my macbook air M2. Here is the terminal output. Any ideas?

`Last login: Sun Jan 22 20:45:36 on ttys002
cd '/Users/user/Downloads/MTGA_Draft_17Lands-main/' && '/usr/local/bin/python3' '/Users/user/Downloads/MTGA_Draft_17Lands-main/main.py' && echo Exit status: $? && exit 1
user@users-MacBook-Air ~ % cd '/Users/user/Downloads/MTGA_Draft_17Lands-main/' && '/usr/local/bin/python3' '/Users/user/Downloads/MTGA_Draft_17Lands-main/main.py' && echo Exit status: $? && exit 1
Traceback (most recent call last):
File "/Users/user/Downloads/MTGA_Draft_17Lands-main/main.py", line 5, in
import overlay as OL
File "/Users/user/Downloads/MTGA_Draft_17Lands-main/overlay.py", line 19, in
import card_logic as CL
File "/Users/user/Downloads/MTGA_Draft_17Lands-main/card_logic.py", line 43, in
@DataClass
^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1220, in dataclass
return wrap(cls)
^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1210, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'card_logic.DeckType'> for field deck_mid is not allowed: use default_factory

`

This looks like it might be an issue with python 3.11.

I will look into it when I get a chance.

I pushed the fix to the main branch.

I will make an official release sometime later this week.

Awesome. Thanks.

I updated the python steps in the README so that they can be used with python 3.11. I'm not going to create a new release since this is the only reported issue and it doesn't affect the executable.