Windows 237 NotADirectory Error with Salesforce Query
I'm running Windows with VSCode-based Powershell and snowfakery 3.5. When I try to run a snowfakery recipe that queries Salesforce records, I receive an error message.
This appears to be the crux of the issue:
NotADirectoryError: [WinError 267] The directory name is invalid: 'C:\\Users\\ALLISO~1\\AppData\\Local\\Temp\\tmp9b9uku52\\queryresults.db'
Full documentation: https://gist.github.com/allisonletts/994828955eb9c266936f73b4d9e52b4b
I'm still having the same issue: https://gist.github.com/allisonletts/0e575f28e49834d676c0571dcd3b88c0
This continues to be an issue on Windows 11.
@acrosman have you attempted on a mac? I haven't, but could.
@allisonletts This code is trying to clean up a temporary directory after the code runs. It claims in the link you provided that the Exception is ignored (line 13 and line 38).
Is that your observation? Does the process work except for an annoying traceback?
It looks like it to me.
It's annoying but at least it shouldn't block your work until it's fixed.
Let me know if it is actually blocking your work.
When I ran into it the other day I'm reasonably confident it stopped cold. I ended up re-writing the recipe to avoid the - plugin: snowfakery.standard_plugins.Salesforce.SOQLDataset entirely, so it'll need to try to assembly a minimal example when I have a few minutes. I did not test it on my mac, but I can do that as well when I have a new sample.
Yeah, I also had it stop, I'm pretty sure.
I've been experimenting with recipes tonight trying to find one that actually blocks the run, and reproduces the errors.
What I've managed to do so far is get recipes that will produce the error, but support @prescod's assertion that it does not block completion. It also seems to only occur in recipes that have multiple queries. Any other error in the recipe will block completion of the inserts, but the ones I created were all unrelated (a few looked like they were).
The error only appears on Windows, not Mac. Requires two or more queries. The error message does not appear to block completion (that I can find so far).
- plugin: snowfakery.standard_plugins.Salesforce.SOQLDataset
- object: Contact
count: 10
fields:
__users_from_salesforce:
SOQLDataset.shuffle:
fields: Id, FirstName, LastName
from: User
__Account_from_Salesforce:
SOQLDataset.shuffle:
fields: Id
from: Account
# The next line depends on the users having particular
# permissions.
FirstName: ${{__users_from_salesforce.FirstName}}
LastName: ${{__users_from_salesforce.LastName}}
AccountId: ${{__Account_from_Salesforce.Id}}