-
Notifications
You must be signed in to change notification settings - Fork 383
Description
Hi, I install pyflow on 3 different pc (windows Mac linux),
at every install, when trying to boot the python node, I get this error
Traceback (most recent call last): File "/Users/fred/pyflow_1/.venv/lib/python3.13/site-packages/PyFlow/Packages/PyFlowBase/UI/UIPythonNode.py", line 198, in onEdit tempFilesDir = self.canvasRef().getApp().getTempDirectory() File "/Users/fred/pyflow_1/.venv/lib/python3.13/site-packages/PyFlow/App.py", line 168, in getTempDirectory if tempDirPath[-1:] in ("/", "\\"): ~~~~~~~~~~~^^^^^ TypeError: 'NoneType' object is not subscriptable
I also get a lot of error and weird behaviour
I saw in the code the preference was noted as
` def getTempDirectory(self):
"""Returns unique temp directory for application instance.
This folder and all its content will be removed from disc on application shutdown.
"""
if self.currentTempDir == "":
# create app folder in documents
# random string used for cases when multiple instances of app are running in the same time
tempDirPath = ConfigManager().getPrefsValue("PREFS", "General/TempFilesDir")
if tempDirPath[-1:] in ("/", "\\"):
tempDirPath = tempDirPath[:-1]
self.currentTempDir = "{0}_{1}".format(tempDirPath, generateRandomString())
if not os.path.exists(self.currentTempDir):
os.makedirs(self.currentTempDir)
return self.currentTempDir`
Changing every reference for preference from
tempDirPath = ConfigManager().getPrefsValue("PREFS", "General/TempFilesDir")
to
tempDirPath = ConfigManager().getPrefsValue("PREFS", "GeneralPreferences/TempFilesDir")
In the preference.ini the reference is writing as general preference
[GeneralPreferences]
EditorCmd=code @FILE
TempFilesDir=C:\\pyflow\\PyFlow\\tmp
ExtraPackageDirs=my_pakages
HistoryDepth=50
RedirectOutput=true
[ThemePreferences]
Theme_Name=Dark
[DemoPrefs]
ExampleProperty=property value
I don't know if its a proper fix but changing all instance seems to have resolve most of my issue