Skip to content
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

Error running script #1

Closed
trbouma opened this issue Jan 19, 2022 · 4 comments
Closed

Error running script #1

trbouma opened this issue Jan 19, 2022 · 4 comments

Comments

@trbouma
Copy link

trbouma commented Jan 19, 2022

Hi, I get this error when I try to run the script. Any ideas what the issue is? Thx

python3 musig-2.py keygen Traceback (most recent call last): File "musig-2.py", line 138, in <module> def write_bytes_list_to_hex(bytes_list: list[bytes], filename: str) -> bool: TypeError: 'type' object is not subscriptable

@meshcollider
Copy link
Owner

Have you modified the script somehow? That doesn't look right.

Firstly I notice the filename is wrong (musig-2.py not musig2.py).
Secondly keygen does not call write_bytes_list_to_hex, so that error doesn't make sense.

Everything runs fine for me on master.

@trbouma
Copy link
Author

trbouma commented Jan 19, 2022

Thanks,
I just cloned the repo into repl.it here https://replit.com/@trbouma/musig2-py#.replit

In the shell, I tried running python3 musig2.py keygen
I got the same error:

Traceback (most recent call last): File "musig2.py", line 138, in <module> def write_bytes_list_to_hex(bytes_list: list[bytes], filename: str) -> bool: TypeError: 'type' object is not subscriptable

You can replicate in the link above.

I am fairly new in this space, so I am probably missing something obvious. Thanks again, Tim

@meshcollider
Copy link
Owner

meshcollider commented Jan 19, 2022

Ah, I see. Python v3.8 and below do not understand list[bytes]. I have pushed a change which should make this compatible with python 3.6+

Let me know if the issue isn't fixed and I'll reopen.

@trbouma
Copy link
Author

trbouma commented Jan 19, 2022

@meshcollider it all works now! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants