C
C#2y ago
guiguig

❔ Process.Start() on Python script on Ubuntu won't start

For a Unity project, I need to generate a text document using a Python script and also generate TTS voice lines using another Python script. My problem is when I start the script using Process.Start(), it just doesn't start and skips that part completely. Here's one of the things I tried:
Process.Start("/usr/bin/python3.10", "/media/guiguig/usb-drive/family-guy-ai-pre-main/make_script.py");
Process.Start("/usr/bin/python3.10", "/media/guiguig/usb-drive/family-guy-ai-pre-main/make_script.py");
7 Replies
cap5lut
cap5lut2y ago
did u check that process' output and error streams? maybe there is some information
cap5lut
cap5lut2y ago
guiguig
guiguigOP2y ago
I managed to get a terminal to open, then open python from there, but now it doesn't detect any modules for some reason?
Process.Start(@"/usr/bin/gnome-terminal", "-e \"/bin/python3 /media/guiguig/usb-drive/family-guy-ai-pre-main/make_script.py\"");
Process.Start(@"/usr/bin/gnome-terminal", "-e \"/bin/python3 /media/guiguig/usb-drive/family-guy-ai-pre-main/make_script.py\"");
cap5lut
cap5lut2y ago
i dunno much about python, maybe it has to do with the working directory u r in?
Ⰽⰰⱈⰻⰽⱄ
Try with /usr/bin/env python3 @guiguig
guiguig
guiguigOP2y ago
That worked, thanks! Well, I thought it worked fine. But turns out it won't let my python script write to a file. I tried logging it's output and it seems to just skip over any part where the file is opened and written to. I tried flushing but it seems to just do nothing.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server