You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using mGear-4.0.9.
We are using the MGEAR_SHIFTER_CUSTOMSTEP_PATH environment variable to set the default custom step location to a folder on our server. (the value is normalized)
When adding other Custom Steps (located on the same server but different folder), they cannot be run and the "Edit" button does not work.
The error message that is shown when pressing the "Edit" button is:
// Error: The step can't be find or does't exists //
When running the step, we get the following error:
Issue with running custom steps:
There is a condition in the shifter.guide.GuideSettings.addCustomStep that removes a "/" from the filePath before adding the item in the UI.
ifos.environ.get(MGEAR_SHIFTER_CUSTOMSTEP_KEY, ""):
filePath=os.path.abspath(filePath)
baseReplace=os.path.abspath(os.environ.get(
MGEAR_SHIFTER_CUSTOMSTEP_KEY, ""))
# backslashes (windows paths) can cause escape charactersfilePath=filePath.replace(baseReplace, "").replace('\\', '/')
# remove front forwardif'/'==filePath[0]:
filePath=filePath[1:]
The path put in the item is then used by shifter.guide.HelperSlots.runStep to execute the step. Because the first slash of the UNC path is removed, the os.path.join that is in shifter.guide.HelperSlots.runStep is not able to join the path correctly and the file is not found.
Potential fix for running custom steps in the server location:
We have implemented a workaround which is to change the condition in shifter.guide.GuideSettings.addCustomStep to only remove the "/" if the path does not start with "//".
# remove front forwardif'/'==filePath[0] and'//'!=filePath[:2]:
filePath=filePath[1:]
Issue with the "Edit" button:
After modifying the condition in shifter.guide.GuideSettings.addCustomStep we can run custom steps that are outside of the MGEAR_SHIFTER_CUSTOMSTEP_PATH location, but the "Edit" button still throws an error.
This is caused by the os.startfile in shifter.guide.HelperSlots.editFile. The os.startfile can not open the UNC path unless the path has been normalized.
Hello,
We are using mGear-4.0.9.
We are using the MGEAR_SHIFTER_CUSTOMSTEP_PATH environment variable to set the default custom step location to a folder on our server. (the value is normalized)
When adding other Custom Steps (located on the same server but different folder), they cannot be run and the "Edit" button does not work.
The error message that is shown when pressing the "Edit" button is:
When running the step, we get the following error:
Issue with running custom steps:
There is a condition in the shifter.guide.GuideSettings.addCustomStep that removes a "/" from the filePath before adding the item in the UI.
The path put in the item is then used by shifter.guide.HelperSlots.runStep to execute the step. Because the first slash of the UNC path is removed, the os.path.join that is in shifter.guide.HelperSlots.runStep is not able to join the path correctly and the file is not found.
Potential fix for running custom steps in the server location:
We have implemented a workaround which is to change the condition in shifter.guide.GuideSettings.addCustomStep to only remove the "/" if the path does not start with "//".
Issue with the "Edit" button:
After modifying the condition in shifter.guide.GuideSettings.addCustomStep we can run custom steps that are outside of the MGEAR_SHIFTER_CUSTOMSTEP_PATH location, but the "Edit" button still throws an error.
This is caused by the os.startfile in shifter.guide.HelperSlots.editFile. The os.startfile can not open the UNC path unless the path has been normalized.
Potential fix "Edit" button:
A potential fix for this could be to normalize the fullPath being returned from shifter.guide.HelperSlots.get_cs_file_fullpath
The text was updated successfully, but these errors were encountered: