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

Update __init__.py #541

Closed
wants to merge 1 commit into from
Closed

Conversation

kakitkelvinho
Copy link

Numpy has moved the depcation warnings to np.exceptions. This change was reflected in the 2 lines above but not in the 2 lines I editted so I have now modified it.

Numpy has moved the depcation warnings to np.exceptions. This change was reflected in the 2 lines above but not in the 2 lines I editted so I have now modified it.
@michaelcroquette
Copy link
Collaborator

Normally the try except syntax is here to make sure that it stays compatible with both versions of numpy. Maybe the error is not catched in your case ? Can you send the error message you get ?

@kakitkelvinho
Copy link
Author

Good point. Here is the error I get:

Traceback (most recent call last):
  File "/home/ninux/Documents/test_red_pitaya/rp0.py", line 1, in <module>
    from pyrpl import Pyrpl
  File "/home/ninux/Documents/test_red_pitaya/.env_rptest/lib/python3.12/site-packages/pyrpl/__init__.py", line 10, in <module>
    warnings.simplefilter("ignore", np.VisibleDeprecationWarning)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ninux/Documents/test_red_pitaya/.env_rptest/lib/python3.12/site-packages/numpy/__init__.py", line 414, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'VisibleDeprecationWarning'

The code is also quite simple, I am trying to see if PyRPL works and can connect to my red pitaya that is running the newest OS (i think it is OS 2.0).

from pyrpl import Pyrpl

HOSTNAME = '192.168.0.224'

p = Pyrpl(hostname=HOSTNAME)

@michaelcroquette
Copy link
Collaborator

This AttributeError should be catch in the exception. Are you sure your code is up to date with the latest commit ?
For running pyrpl with the newest RP OS, check the pull request #518.

@kakitkelvinho
Copy link
Author

Probably not, I installed pyrpl via pip which I saw from other issues is quite outdated. I will also look into PR 518, 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

Successfully merging this pull request may close these issues.

2 participants