-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileNotFoundError generated for template.py #5717
Comments
I'm still new to Spyder myself, but this (perhaps naively) appears at least partially recognizable. Was this just launching Spyder, or did you try to create a new file? A quick look at your error is sufficient to guess at the proximate cause: it would seem that spyder couldn't read the template file it uses to create a new file (normally located at More detail (or really, any detail) about the circumstances during which this error occurred would likely be of help in diagnosing this further, and determining the root cause (as it could conceivably be that simply something happened to just this file, or this is a symptom of some deeper issue with your Spyder install), and to start with you could report whether the file and directory in question exists, and (if at least the latter is true) creating a fresh file with that name with some dummy text and seeing if the problem (or what problem) reoccurs in the same circumstances. Again, I'm new to Spyder so the actual problem may be something much deeper entirely, but hopefully this is of some help to get started. |
@CAMGerlach-Baron, thanks for chiming in. I think you're right about the source of this error. My gut feeling tells me that this could be generated by an antivirus issue, which is removing the template file from the filesystem while Spyder is running. I really don't have any other explanation for this... |
@CAMGerlach-Baron, I think this is a Windows only issue and it happens when people installs Anaconda as Administrator on Windows and then runs it for a particular user. Could you try to reproduce it with a clean config, please? |
@ccordoba12 My current home machine is set up that way, Anaconda installed as admin/"For all users", and then running on the local account. I haven't seen this issue prior, so I logged in via a clean, non-admin user account I use for troubleshooting, different from the one I installed it on, and it didn't have any issue running spyder or creating/saving a new file either from the command line or Anaconda navigator. I can certainly go beyond this in testing, Would you like me to try installing Spyder in a fresh environment under that user account, and then trying again? Or should I do a complete uninstall of Anaconda and it when logged in as the clean non-Admin user, using my Admin rights to install, and then trying to run Spyder from that account? Given its a fairly big step, I want to be clear on the procedure you think most likely to reproduce it. Thanks! |
I think this is a permissions error, so the problem should appear if you install Anaconda for your user as Admin, then try to use it with an unprivileged user. |
Although I don't know if that's possible. |
@ccordoba12 Okay thanks. It is indeed possible, as that is essentially what I did on my machine. I originally installed Anaconda with my admin account a few months back, use Spyder regularly with my normal account, and then just tried running Spyder with another clean, unprivileged user account and it worked just fine, and I've never seen this issue. One thing I didn't try, which I can do when I get home tonight, is uninstall Anaconda with my admin account, then log in to the clean temp account, launch the installer, and then tell it to install for all users, elevating with UAC (like Windows |
Description
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Please provide any additional information below
File "C:\ProgramData\Anaconda3\envs\MyProjects\lib\site-packages\spyder\plugins\editor.py", line 1712, in new
text, enc = encoding.read(self.TEMPLATE_PATH)
File "C:\ProgramData\Anaconda3\envs\MyProjects\lib\site-packages\spyder\utils\encoding.py", line 243, in read
text, encoding = decode( open(filename, 'rb').read() )
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Edilbert\.spyder-py3\template.py'
Version and main components
Dependencies
The text was updated successfully, but these errors were encountered: