Importing variables problem
See original GitHub issueDescription
What steps will reproduce the problem?
No code used, just selecting ‘import data’ in the variables explorer, that I had previously saved as .spydata
Traceback
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\variableexplorer\widgets\namespacebrowser.py", line 207, in <lambda>
triggered=lambda: self.import_data())
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\variableexplorer\widgets\namespacebrowser.py", line 444, in import_data
error_message = self.shellwidget.load_data(self.filename, ext)
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\widgets\namespacebrowser.py", line 126, in load_data
timeout=CALL_KERNEL_TIMEOUT).load_data(filename, ext)
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\comms\commbase.py", line 542, in __call__
call_dict, call_data, self._comm_id)
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\comms\kernelcomm.py", line 114, in _get_call_return_value
call_dict, call_data, comm_id)
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\comms\commbase.py", line 420, in _get_call_return_value
return self._sync_error(reply['value'])
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\comms\commbase.py", line 480, in _sync_error
error_wrapper.raise_error()
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\comms\commbase.py", line 90, in raise_error
raise self.etype(self)
Exception in comms call load_data:
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\comms\commbase.py", line 342, in _handle_remote_call
buffer['call_kwargs'])
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\comms\commbase.py", line 353, in _remote_callback
*call_args, **call_kwargs)
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\console\kernel.py", line 249, in load_data
data, error_message = load_func(filename)
File "C:\Users\manol\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\utils\iofuncs.py", line 406, in load_dictionary
data = pickle.loads(fdesc.read())
ModuleNotFoundError: No module named 'functions'
WARNING:spyder.widgets.github.backend:Failed to send bug report on Github. response={'code': 401, 'json': {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}}
WARNING:spyder.widgets.github.backend:Failed to send bug report on Github. response={'code': 401, 'json': {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}}
WARNING:spyder.widgets.github.backend:Failed to send bug report on Github. response={'code': 401, 'json': {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}}
Versions
- Spyder version: 4.0.0
- Python version: 3.7.4
- Qt version: 5.9.6
- PyQt5 version: 5.9.2
- Operating System: Windows 10
Dependencies
cloudpickle >=0.5.0 : 1.2.2 (OK)
pygments >=2.0 : 2.5.2 (OK)
qtconsole >=4.6.0 : 4.6.0 (OK)
nbconvert >=4.0 : 5.6.1 (OK)
sphinx >=0.6.6 : 2.2.2 (OK)
pylint >=0.25 : 2.4.4 (OK)
psutil >=0.3 : 5.6.7 (OK)
qtawesome >=0.5.7 : 0.6.0 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
zmq >=17 : 18.1.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
numpydoc >=0.6.0 : 0.9.1 (OK)
spyder_kernels >=1.8.1;<2.0.0: 1.8.1 (OK)
qdarkstyle >=2.7 : 2.7 (OK)
atomicwrites >=1.2.0 : 1.3.0 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
intervaltree : None (OK)
watchdog : None (OK)
keyring : None (OK)
pexpect >=4.4.0 : 4.7.0 (OK)
pympler : None (OK)
sympy >=0.7.3 : None (NOK)
cython >=0.21 : None (NOK)
IPython >=4.0 : 7.10.1 (OK)
matplotlib >=2.0.0 : 3.1.2 (OK)
pandas >=0.13.1 : 0.25.3 (OK)
numpy >=1.7 : 1.17.4 (OK)
scipy >=0.17.0 : 1.3.2 (OK)
pyls >=0.31.2;<0.32.0 : 0.31.2 (OK)
rtree >=0.8.3 : 0.8.3 (OK)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error importing variable from another file - Stack Overflow
If it matters: the variable is an array, the files are in the same folder, and the project is using tkinter.
Read more >Importing variables not working? - Robot Framework
A major problem normal variables, i.e. reading them directly from the variable file module, is that nearly everything becomes a variable.
Read more >How to import variables from another file in Python?
To import variables from another file, we have to import that file from the current program. This will provide access to all the...
Read more >Finding help on Stata problems / Importing data from a csv file
Lab 1: Finding help on Stata problems / Importing data from a csv file ... convert variables from string to numeric in STATA....
Read more >Undefined variables when importing - SAM Forum
I have created two simulations in SAM, one PV and the other CSP, then I took the code to Python 3. So far...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, found a solution. It had to do with the active directory. It has to be swapped into the one my scripts are in 😃
Hi Carlos, (after a long time) I found out what the issue with importing variables is: packages have have to be imported first, else spyder crashes 😃
On Mon, 23 Dec 2019 at 15:31, Carlos Cordoba notifications@github.com wrote: