Closed ZedeN1 closed 3 weeks ago
Changing tuflowqgis_menu.py
:
from subprocess import Popen, PIPE, DETACHED_PROCESS
import sys
to
import sys
if sys.platform != 'win32':
from subprocess import Popen, PIPE
else:
from subprocess import Popen, PIPE, DETACHED_PROCESS
and changing
process = subprocess.Popen(command, creationflags=DETACHED_PROCESS, start_new_session=True)
to
if sys.platform != 'win32':
process = subprocess.Popen(command, cwd="/",
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
start_new_session=True)
else:
process = subprocess.Popen(command, creationflags=DETACHED_PROCESS, start_new_session=True)
Hi,
Sorry about that
I have not tested the TUFLOW runner on Linux.
I had a guard to give an error if someone tried to run it on Linux: if os.name != 'nt':
However, the include issue occurs even before you get there (which I wasn't aware of).
I will make a change along the lines that you have so it doesn't prevent people from using the runner. For now will have to let people know that they can't use the runner on Linux for now if they try.
Rusty Jones Technical Lead
[cid:7b9d3573-9d0b-4e6b-a6e1-99d69696e8e0]https://www.tuflow.com/ TUFLOW Productshttps://www.tuflow.com/products/ | TUFLOW Pricinghttps://www.tuflow.com/pricing/ | TUFLOW Supporthttps://www.tuflow.com/support/ | TUFLOW Traininghttps://www.tuflow.com/training/ | LinkedInhttps://www.linkedin.com/groups/1908583/ | YouTubehttps://www.youtube.com/channel/UCZuGrIP8ayOwC1ojmnZrgPg
New TUFLOW Release 2023-03-AE now available: Release Noteshttps://docs.tuflow.com/classic-hpc/release/2023-03-AE/ | Downloads Pagehttps://scanmail.trustwave.com/?c=16827&d=nZvZ5BMwYX9Zmz8YsQf3aztB9zXBhmTTKV2c7BjquA&u=https%3a%2f%2fwww.tuflow.com%2fdownloads%2f%23tuflow
From: ZedeN1 @.> Sent: Tuesday, April 23, 2024 5:10 AM To: TUFLOW-Support/QGIS-TUFLOW-Plugin @.> Cc: Subscribed @.***> Subject: Re: [TUFLOW-Support/QGIS-TUFLOW-Plugin] [Linux - v3.11 and v3.11.0.1] ImportError: cannot import name 'DETACHED_PROCESS' from 'subprocess' (Issue #39)
Below works, but not sure if it is appropriate.
Changing ``
from subprocess import Popen, PIPE, DETACHED_PROCESS import sys
to
import sys if sys.platform != 'win32': from subprocess import Popen, PIPE else: from subprocess import Popen, PIPE, DETACHED_PROCESS
and changing
process = subprocess.Popen(command, creationflags=DETACHED_PROCESS, start_new_session=True)
to
if sys.platform != 'win32':
process = subprocess.Popen(command, cwd="/",
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
start_new_session=True)
else:
process = subprocess.Popen(command, creationflags=DETACHED_PROCESS, start_new_session=True)
— Reply to this email directly, view it on GitHubhttps://github.com/TUFLOW-Support/QGIS-TUFLOW-Plugin/issues/39#issuecomment-2071923531, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABB5WFA6IUV6DBH66GPK23LY6YXQDAVCNFSM6AAAAABGUQWTS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZRHEZDGNJTGE. You are receiving this because you are subscribed to this thread.Message ID: @.***>
v3.11.1 fixed the issue.
Updating to the newest available plugin in the QGIS repository v3.11 / developer plugin v3.11.0.1 breaks the plugin on Linux.