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

Trouble Running Beampy.open_app() in a Python Environment #6

Open
AlaaPh opened this issue Feb 17, 2024 · 3 comments
Open

Trouble Running Beampy.open_app() in a Python Environment #6

AlaaPh opened this issue Feb 17, 2024 · 3 comments

Comments

@AlaaPh
Copy link

AlaaPh commented Feb 17, 2024

Description of the Issue:
I'm encountering an issue when trying to run the open_app() function from the Beampy library. After activating my virtual environment and attempting to execute the function via a Python shell in the terminal, it seems to prompt me for further input without opening the application GUI as expected.

Steps to Reproduce:

  1. Activated my virtual environment.

  2. Navigated to my project directory my_beampy_project.

  3. Ran a Python shell and executed the following commands:
    python import beampy beampy.open_app()

  4. Instead of opening the GUI, the shell prompted me with function>.

Expected Behavior:
I expected the open_app() function to launch the Beampy application's GUI.

Actual Behavior:
The shell prompts with function> after executing beampy.open_app(), and the GUI does not launch.

Environment:

  • OS: macOS (Big Sur 11.2.3)
  • Python Version: (Python 3.9.1)
  • Beampy Version: (v1.11)
@Python-simulation
Copy link
Owner

Hi! I tested it on macOS 12.5.1 and python 3.9.18 and it work as intended.
Normally if you get <function open_app at 0x000001FDF5E004C0> it means you typed beampy.open_app and not beampy.open_app().
Can you confirm you that you first open a python console by typing python, then import the package with import beampy and finally type beampy.open_app() ?

@AlaaPh
Copy link
Author

AlaaPh commented Feb 19, 2024

Hi,

Thank you for the quick response. I've confirmed that I'm opening a Python console, importing Beampy, and then calling beampy.open_app() with the parentheses. However, I'm still facing the same issue where it doesn't open the GUI and instead shows function> in the console, as if it's waiting for further input.

Here are the exact steps I followed in the terminal:

Activated my virtual environment.
Ran the Python console with python command.
Imported Beampy using import beampy.
Called the function with beampy.open_app().
I'm attaching a screenshot of the terminal showing the commands I've entered and the output I received.
Screenshot 2024-02-19 at 18 35 30

@Python-simulation
Copy link
Owner

I'm not familiar with mac OS, but it seems that you are not in a Python console. Normally you should type python or python3 to start a Python console inside your terminal, which displays something like that:

(base) C:\Users\username>python
Python 3.9.18 (main, Sep 11 2023, 14:09:26) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Only then you can import the package and call its functions open_app:

>>>import beampy
>>>beampy.open_app()

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