beeware / briefcase

Tools to support converting a Python project into a standalone native application.
https://briefcase.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.68k stars 371 forks source link

My summarization application doesn't work when installed on another computer #555

Closed frsnmk closed 3 years ago

frsnmk commented 3 years ago

I have succeeded in creating a GUI for a text summarization application using Beewaree, the summarization runs on a computer that has python 3.7.5 installed (I am using python version 3.7.5), but when I installed the application on the computer it didn't install python 3.7.5 the summary didn't work , only the GUI works. If I may know where I made a mistake? can we make the summarization work on all computers even that do not have python 3.7.5 installed?

freakboy3742 commented 3 years ago

We're going to need a little more detail on the app itself to be able to provide any sort of assistance here.

First off - what platform are you on?

Secondly, can you confirm whether

Lastly - What exactly do you mean by "summary not working"?

For some background - a packaged Briefcase app includes a copy of Python. A Briefcase app should be a completely standalone item, with no pre-requisites for the computer where you run the app. If your app has any external dependencies that aren't listed in your pyproject.toml file, that could be a source of problems - but without knowing more about your app, it's impossible to say for sure.

frsnmk commented 3 years ago

gitissu1 When I run it on a computer with python 3.7.5 installed, my automatic summarization model works fine as shown, but when I try to install my application on another computer that is not installed python 3.7.5 the summarization model doesn't work so it doesn't produce any output when run with the click of a button. I don't understand the mistake I made ..thank you in advance for the response

freakboy3742 commented 3 years ago

Firstly - my apologies - I meant briefcase package, not briefcase publish.

Secondly - it sounds like you're describing an app where all the GUI elements are working, but the "business logic" that you've implemented is failing.

If that business logic is working in development, then it suggests to me that your business logic is dependent upon something that is only present in the development environment - for example, a file that is in the development environment, but isn't being packaged with the app; or code that hard-codes a file path that is only accurate on the development machine.

What you'll probably find is that the button handler is working - but the summarisation logic is crashing before it writes anything to the output box. My suggestion would be to wrap the content of your button handler in a try/except block, and display a dialog in the except case to catch the error. For example, if your code looked like:

def on_button_press(self, widget):
    do_summarise()

you would modify it to read:

def on_button_press(self, widget):
    try:
        do_summarise()
    except Exception as e:
        self.main_window.error_dialog('Something went wrong', str(e))

That way, you'll get a popup dialog if do_summarize() raises an error, which should let you diagnose what is going on.

frsnmk commented 3 years ago

thanks for the suggestion, it shows an error that there is a module that is not installed. Once again, thank you very much, sorry for asking a lot because I am new to programming. but may I ask one more question? I tried an application that I made that can't be installed on a 32 bit Windows computer, is there really no support for that? Thank you very much in advance