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

Installation error #36

Open
hrushikesh-s opened this issue Sep 13, 2023 · 2 comments
Open

Installation error #36

hrushikesh-s opened this issue Sep 13, 2023 · 2 comments
Labels
bug not't working as it should be

Comments

@hrushikesh-s
Copy link
Member

When running the following command to [initiate a definition project](https://alab-management.readthedocs.io/en/latest/setup.html):
python -m alabos init

I get the following error:

File "/Users/HPSahasrabuddhe/config_files/alabos/__init__.py", line 15, in <module>
    add_device(Furnace(name="furnace", address="128.3.19.20"))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class Furnace with abstract methods connect, disconnect

Upon checking the Furnace class, which inherits from the BaseDevice class, it appears that the issue is in the following two methods:

@abstractmethod
def connect(self):
    """
    Connect to any devices here. This will be called by alabos to make connections to devices at the appropriate time.

    This method must be defined even if no device connections are required! Just return in this case.

    """
    raise NotImplementedError()

@abstractmethod
def disconnect(self):
    """
    Disconnect from devices here. This will be called by alabos to release connections to devices at the appropriate time.

    This method must be defined even if no device connections are required! Just return in this case.
    """
    raise NotImplementedError()

Should the above two methods be instantiated while defining the Furnace class?
Maybe I'm missing something here.

@idocx
Copy link
Member

idocx commented Sep 13, 2023

python -m alabos init has not been updated for a while, which means it cannot support some of the latest APIs. We will update the document and fix these issues soon. For the temporary solution, you can start from alab_one_sim which has already had a configuration file written.

@hrushikesh-s
Copy link
Member Author

Could you pls share the link to alab_one_sim file? Are you referring to this file by any chance?

@bernardusrendy bernardusrendy added the bug not't working as it should be label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug not't working as it should be
Projects
None yet
Development

No branches or pull requests

3 participants