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

Threading option appears to be broken #31

Open
joshc011 opened this issue Jul 12, 2024 · 8 comments
Open

Threading option appears to be broken #31

joshc011 opened this issue Jul 12, 2024 · 8 comments

Comments

@joshc011
Copy link

Hello,
I'm working on a custom controller for an art project here in Brooklyn. Everything is working great except the persistent sending option. I've been using all other functions with success, but the threading option doesn't seem to work for me.
Using -V 3.9.2
Thanks,
=LLL

@cpvalente
Copy link
Owner

cpvalente commented Jul 13, 2024

Hello,

I'm working on a custom controller for an art project here in Brooklyn. Everything is working great except the persistent sending option. I've been using all other functions with success, but the threading option doesn't seem to work for me.

Using -V 3.9.2

Thanks,

=LLL

Hi, thank you for reaching out.

Can you provide a code example reproducing the issue and a description of what you are retrying to achieve and which behaviour you are finding?

You could also try v1.4.0 just in case the issue comes from the newly introduced code

@joshc011
Copy link
Author

I'm using example.py for testing.
Line 38, 41, 45, and 62 generate the expected response from my artnet device, but the loop between lines 54 and 58 does not result in any response from the receiving device.
=LLL

@cpvalente
Copy link
Owner

I'm using example.py for testing.

Line 38, 41, 45, and 62 generate the expected response from my artnet device, but the loop between lines 54 and 58 does not result in any response from the receiving device.

=LLL

Thank you. Did you check if v1.4.0 worked as expected?

@joshc011
Copy link
Author

Yup, v1.4.0 threading option works as expected.
Thanks, should I plan to stick with v1.4.0 in the foreseeable future?

@cpvalente
Copy link
Owner

Yup, v1.4.0 threading option works as expected.

Thanks, should I plan to stick with v1.4.0 in the foreseeable future?

V1.5.0 introduced a lower level api for handling threading so that it would be supported by micro-Python.

If you are not using micro-Python I would say that sticking to v1.4.0.

Meanwhile it could be worth investigating whether we can fix the current version, I imagine that it shouldn't be particularly complex. If it is, I would suggest reverting the changes.

Do you have availability to investigate the issue and create proposal fix PR?

@joshc011
Copy link
Author

My python skills are intermediate at best, so I'm not sure I'd be up to that task.
Thanks,
=LLL

@mikacousin
Copy link

Hi,

I've just tested this library on a computer with full python and I think I've found the bug.

In StupidArtnet.py, line 197, "elif" must be replaced by "if".
Otherwise, start_new_thread is never executed.

In fact, I don't understand how it can work with micropython but I don't use it.

I can propose a PR if you want.

@cpvalente
Copy link
Owner

Hi @mikacousin , this sounds about right. a PR would be helpful
Thank yoy

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

3 participants