Hello!
Created an app in python to work on Mac, the app works perfectly through terminal but shows error on Launcher. Am new to the mac environment. Please help me resolve this without breaking anything on Mac Ventura 13.5.
Thanks
Kripa
Hello!
Created an app in python to work on Mac, the app works perfectly through terminal but shows error on Launcher. Am new to the mac environment. Please help me resolve this without breaking anything on Mac Ventura 13.5.
Thanks
Kripa
You have provide no useful details.
What error are you seeing?
How are you configuring launcher?
Is the code small enough to share?
You could try appify:
https://stromberg.dnsalias.org/~strombrg/mactools/
Full disclosure: I didn’t write appify, but I do maintain a version of it.
Sorry about not providing enough information.
I created a python app for Mac(OS version- Ventura 13.5). Version of python used for development - 3.11.
The app was created using Py2app on Mac using the following command.
from setuptools import setup
APP = [‘Process.py’]
DATA_FILES =
OPTIONS = {
}
setup(
app = APP,
data_files = DATA_FILES,
options={‘py2app’:OPTIONS},
setup_requires=[‘py2app’],
)
The app is created to read a text file that outputs another text file. Code is attached.
The app created in the dist folder was moved to the client mac. When the app is double clicked, the launcher shows this error(attached screenshot)
When the app is executed using the command at the terminal, it runs without any issues providing the necessary output.
The user needs the double click to work without the need to use the terminal command every time.
The code is attached in this jpeg.
Thanks for info. But i cannot copybtext out of pictures of text!
Use the pre-formatted text feature of this website. That is the </> icon in the cog menu.
I use py2app a lot and can help once you providecrhe text of setup.py and your code as preformatted text.
Hi,
Adding code for setup.py & Process.py here.
setup.py
APP = [‘Process.py’]
DATA_FILES =
OPTIONS = {
}
setup(
app = APP,
data_files = DATA_FILES,
options={‘py2app’:OPTIONS},
setup_requires=[‘py2app’],
)
Process.py
import os
import hl7
from datetime import datetime
TestString = "301(23)12343"
Path = os.path.abspath(os.path.join(os.getcwd(), "../../.."))
Logfilename = "TestLog.txt"
LogOutput = os.path.join(Path, Logfilename)
def writelogfile(datatext):
with open(LogOutput, "a",encoding='utf8') as ErrorLogfile:
ErrorLogfile.write(str(datatext) + '\n')
ErrorLogfile.close()
writelogfile(Path)
print(Path)
Thank you
Hi Barry,
Did you get a chance to review the code. Please let me know if you need any additional information.
Thanks
Kripa