-
-
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
Unable to save workspace on Linux #7196
Comments
I also reported this issue 7 months back (#5647), till now not getting solution. This is creating big trouble for me. Please help. |
And save option of spyder works for windows, but not working on ubuntu. |
Yup, I can reproduce this running the latest |
@ccordoba12 I successfully isolated the problem. It simply appears to be that the file extension |
Yeah, it sounds good. Please proceed with it. |
Dear sir, i didn't understand the above discussions. Please help me for
solutions.
…On Thu, May 24, 2018 at 10:35 PM, Carlos Cordoba ***@***.***> wrote:
Yeah, it sounds good. Please proceed with it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7196 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AdMpSvimGFsveR5xSxepyftimk5EJmVqks5t1uhjgaJpZM4UML0c>
.
--
Hitesh Tekchandani
PhD Research Scholar
NIT Raipur
India
|
@hiteshnitetc As I mentioned,
so just type |
@CAM-Gerlach Very thnx. You saved my lot of time. Otherwise i was saving all variable using pickle. I am wondering, why this simple solution i didn't try. |
Glad to hear it! Sometimes the simplest solutions are the easiest to miss; I know that all too well myself. |
@CAM-Gerlach I don't know if you have worked on this one yet but I did some research and might have a fix. You can assign me this one if you don't want it. |
@bcolsen It should be a pretty simple fix (see my comment above outlining the solution) and I've been pretty busy working on a big grant proposal lately, so you're welcome to go for it. |
It's not too bad, but do need a pop up so it doesn't silently overwrite files. |
@CAM-Gerlach Now i am unable save data from variable explorer after adding .spydata to file name. |
What version of Spyder, Spyder-Kernels and Python are you using? What changed since it worked? What specific error messages/behavior are you getting? Have you upgraded to the latest version of Spyder and Spyder-Kernels (3.3.3 and 0.4.2)? We've implemented some significant improvements in saving and loading
After what, specifically? What did you change/update that resulted in it not working
Did you try not adding |
@CAM-Gerlach previously i was using spyder 3.3 , now i updated to 3.3 , it's working , thnx. |
|
@CAM-Gerlach ooh really sorry for typo. i was using 3.2 now upgraded to 3.3 |
@hiteshnitetc Those still aren't real versions, sorry. Do you mean 3.3.2 to 3.3.3? Or 3.2.x to 3.3.x? |
@Cam Gerlach,l yes i mean 3.3.2 to 3.3.3
…On Tue, Mar 26, 2019 at 8:39 PM CAM Gerlach ***@***.***> wrote:
@hiteshnitetc <https://github.com/hiteshnitetc> Those still aren't real
versions, sorry. Do you mean 3.3.2 to 3.3.3? Or 3.2.x to 3.3.x?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7196 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AdMpSmJplFWfUwVSKCh2anfh_x-6eKJBks5vajgTgaJpZM4UML0c>
.
--
Hitesh Tekchandani
PhD Research Scholar
NIT Raipur
India
|
Hi @bcolsen and @ccordoba12, |
@arteagac We're always happy for some help! Feel free to go ahead with a PR, and let us know if you have questions. Thanks! |
Awesome! I'll work on it. |
@arteagac This is a Spyder wide problem that will happen with every save dialogue on linux not just with the data explorer. The qt file picker(only used in linux) doesn't support adding extensions to files based on the extension. To fix it we could:
This is why I haven't fixed this yet. I hope this helps you find a few directions to look. |
Hi @bcolsen, Thank you for such a detailed description of potential fixes for the bug. I think I will start exploring the options 2 and 3 you mentioned and I will let you know how it goes. Thanks again. |
Hi @bcolsen,
I am not really sure how to proceed. Do you have any suggestions? My short experience suggests that perhaps option 2 is better than nothing but I am not really convinced. #################################################################
###### CODE FOR OPTION #2 (Wrapper that appends extension) ######
#################################################################
import sys
import os.path
from PyQt5.QtWidgets import QApplication, QWidget, QInputDialog, QLineEdit, QFileDialog, QMessageBox
class App(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.setWindowTitle('File dialogs')
self.setGeometry(10, 10, 640, 480)
fileName, selFilter = QFileDialog.getSaveFileName(self,"Save","","Text Files (*.txt)")
fileName += ".txt"
if os.path.exists(fileName):
reply = QMessageBox.question(self, 'Message',"Are you sure you want to overwrite "+fileName+"?", QMessageBox.Yes, QMessageBox.No)
print("File overwritten" if reply == QMessageBox.Yes else "File NOT overwritten")
print(fileName)
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = App()
sys.exit(app.exec_()) |
I played around with native Gtk save dialogs and they don't add the file extensions either. I think option 2 is the best way to go currently, and your simple method outlined above is the way to go. I have 3 suggestions:
|
Thanks @bcolsen, |
Those strings are produced from a dictionary in iofunctions so it should be fine extract the extension from the string. I would just use rfind and some string indexing to get the extension. It should always be of the form |
- rename ext variable to more explicit extension - rename ext in iimport_data to extension too for consistency - add comment for related issue spyder-ide#7196
- rename ext variable to more explicit extension - rename ext in iimport_data to extension too for consistency - add comment for related issue spyder-ide#7196
Problem Description
Unable to save workspace
What steps will reproduce the problem?
Just create a python list, and try to save using save data icon
Package Versions
Dependencies
The text was updated successfully, but these errors were encountered: