These are chat archives for spyder-ide/public

27th
Feb 2019
Silviu Oprea
@silviu-oprea
Feb 27 00:09
thanks. I did replace all occurrences of #19232D with another color in the code
but it still stays with #19232D
(removed pycache s)
does it cache somewhere else?
CAM Gerlach
@CAM-Gerlach
Feb 27 00:11
The core dark theme code is part of a separate package, QDarkStyle. You would need to change their stylesheets as well.
Silviu Oprea
@silviu-oprea
Feb 27 00:14
So, for instance, what would be the point of specifying the colors in spyder/config/main.py?
is that used anywhere?
CAM Gerlach
@CAM-Gerlach
Feb 27 00:16
It depends on where they're specified and for what, I don't know off the top of my head, sorry. Some colors are not controlled by QDarkStyle and are rather specified in our code or even the config file, like those used for syntax highlighting.
Silviu Oprea
@silviu-oprea
Feb 27 01:02
OK so I found spyder/app/mac_stylesheet.qss
I changed all occurences of #19232D to another color but it only changes the status bar :)
to make sure they are covered
also replaced all occurences of that color everywhere in the spyder code
stuck :)
Silviu Oprea
@silviu-oprea
Feb 27 01:19
OK basically in mainwindow.py line 596 it was overriding mac_stylesheet.qss loaded in the constructor with the one from the environment
load_stylesheet_from_environment
dla06c
@dla06c
Feb 27 02:37
recently started using Spyder, been great so far. However, I've run into an issue where I can't get a script created in Spyder to run with Windows Task Scheduler. I can get a really basic script to run with no problem. My more complex scripts will not. The script requires json, urllib, datetime, time, and pandas to be imported. I think pandas is where it is falling over. there anyone I could talk to about sorting this issue?
Silviu Oprea
@silviu-oprea
Feb 27 03:15
@CAM-Gerlach Actually spyder-notebook seems to be working fine so far.
only caveat is that it off course has it's own theme, nothing to do with spyder's theme, so need to set that separately
CAM Gerlach
@CAM-Gerlach
Feb 27 03:34

I can't get a script created in Spyder to run with Windows Task Scheduler

@dla06c A "script created in Spyder" is just a Python script, same as any other. Unless it doesn't work if you run it with python script_name.py in Anaconda prompt but does in Spyder, then the latter doesn't have anything to do with the problem.

However, I strongly suspect the issue is its not being run with the Anaconda python.exe (which is a modern version and has access to the correct packages, including pandas). Presumably, you need to include the full path to the Anaconda interpreter in your environment of choice (the one in base should do fine, which can be found at <ANACONDA-DIR>/python.exe).

Actually spyder-notebook seems to be working fine so far.

@silviu-oprea Great news. Again, I wouldn't count on it for production work (nor the dev version of Spyder itself) unless you're suitably prepared to face a substantial number of remaining bugs that we're still working through, particularly with the new LSP-based completion/help/calltip/analysis architecture.

dla06c
@dla06c
Feb 27 05:43
image.png
@CAM-Gerlach First, thanks for the fast reply. Bare with me, I am a Py-novice. Definitely using the the right .exe C:\Users\logan\Anaconda3\python.exe . If I execute python from this folder, should it have access to packages such as pandas? meaning, if I were to type import pandas, I shouldn't get an error?
CAM Gerlach
@CAM-Gerlach
Feb 27 05:57
@dla06c You might need to activate your environment first if you're not running it from Anaconda prompt. Sorry, but to keep this on topic, as I mentioned before, this really doesn't have anything whatsoever to do with Spyder, and so I'd recommend asking in a more appropriate forum where people are more likely to be able to help you with this specific problem. Best of luck!
AvrilGZC
@AvrilGZC
Feb 27 05:58
hi, I was just wondering the Spyder3.3.3 cannot be launched in Anaconda...so how can I fix it?
CAM Gerlach
@CAM-Gerlach
Feb 27 06:02
@AvrilGZC Sorry, but you'll need to be way more specific, since there's a nearly infinite variety of reasons for Spyder not being able to launch. Are you launching it from the shortcut? From the Anaconda prompt? From Navigator? What are the versions of Python, Qt, PyQt (you can get them via conda list), your OS, and Anaconda itself (not Navigator, Conda or Python) you are using? Also, please be more specific about exactly what happens when you try to launch it and the exact text of any errors you see. Thanks.
AvrilGZC
@AvrilGZC
Feb 27 06:10
Thanks.When I tried to open Spyder from Anaconda prompt, it showed errors like:Traceback (most recent call last):
File "D:\Ana\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "D:\Ana\lib\site-packages\spyder\app\start.py", line 186, in main
from spyder.app import mainwindow
File "D:\Ana\lib\site-packages\spyder\app\mainwindow.py", line 90, in <module>
from qtpy import QtWebEngineWidgets # analysis:ignore
File "D:\Ana\lib\site-packages\qtpy\QtWebEngineWidgets.py", line 22, in <module>
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ValueError: PyCapsule_GetPointer called with incorrect name
When I tried to open from Navigator, it just had no respense.My versions for Python , Qt, PyQt are 3.7.2,5.9.7 and 5.9.2, respectively.
My Anaconda version is custom.And my OS version is win10
When I tried to open Jupyter, it showed errors :(base) C:\WINDOWS\system32>jupyter
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
[--paths] [--json]
[subcommand]
jupyter: error: one of the arguments --version subcommand --config-dir --data-dir --runtime-dir --paths is required
CAM Gerlach
@CAM-Gerlach
Feb 27 06:15
The reason your jupyter command failed was, exactly as it states, you not calling it correctly.
Have you tried to install anything with pip or from conda-forge? How recently did you install Anaconda? Has Spyder worked before? Are you running it from the base environment (t he default)?
Try jupyter qtconsole, for instance.
AvrilGZC
@AvrilGZC
Feb 27 06:17
'Jupyter qtconsole' opened a window('Jupyter qtconsole' ).
CAM Gerlach
@CAM-Gerlach
Feb 27 06:17
As expected.
AvrilGZC
@AvrilGZC
Feb 27 06:19
I downloaded and installed Anaconda yesterday morning. Since then I cannot open spyder because of errors
Then I searched on the internet and did command "pip install pyqt5","spyder --new-instance"
CAM Gerlach
@CAM-Gerlach
Feb 27 06:20

Since then I cannot open spyder because of errors

Which errors, specifically?

Then I searched on the internet and did command "pip install pyqt5"

That command broke Spyder, and quite possibly contaiminated your entire base environment. As we say very explicitly numerous places in our documentation, troubleshooting guide, wiki, readme, contributing guide, install guide, Stack Overflow and Github issue tracker, you shouldn't install anything Spyder-related with pip unless you really know what you are doing, and in particular you should never, ever install PyQt5 or spyder with pip in an existing conda environment since it will almost certainly break something.

I appreciate you trying to get help on your own, but next time, please read our many up to date and authoritative resources before running random commands you find off the internet, unless otherwise instructed by a Spyder contributor.
AvrilGZC
@AvrilGZC
Feb 27 06:26
Okay,sorry about my attempt. So should I reinstall Anaconda now?
CAM Gerlach
@CAM-Gerlach
Feb 27 06:26
Yeah, if you just installed Anaconda, its probably easier/safer to just uninstall and reinstall the whole thing then try to recover at this point.
Once that happens, please share with us the exact error you are getting trying to launch Spyder, and we'll very likely be able to let you know exactly how to fix it. In general, its both fastest/easiest and less likely to run into errors if you launch Spyder via the Windows shortcut, since Anaconda Navigator can introduce errors into the process.
AvrilGZC
@AvrilGZC
Feb 27 06:29
Okay I am heading to reinstall all of them.Thanks for your help.
CAM Gerlach
@CAM-Gerlach
Feb 27 06:31
Okay, thanks! Let us know if you still have an error launching Spyder, and we'll give you further guidance. Best of luck!
JamesChou2016
@JamesChou2016
Feb 27 10:34
When I use Spyder 3.3.1, the icons become indistinguished. By the way, how could I send a screenshot?
CAM Gerlach
@CAM-Gerlach
Feb 27 15:56
@JamesChou2016 Spyder 3.3.1 is many months old. Try updating spyder, spyder-kernels, qtpy and qtawesome. If that doesn't fix it, please provide your Operating System, Python, PyQt, Qt, and QtAwesome versions along with the environment you're using Spyder in (Anaconda, WinPython, OS Packages, plain Python, etc) and with what package manager (Conda or pip).

By the way, how could I send a screenshot?

Just paste it in the chat. Some users have reported issues doing so in Chrome, or from the chat inthe sidebar of our site, spyder-ide.org, vs. the one on gitter.im.

Does it look like this?

image.png

If so, you are probably using PyQt/Qt 5.12, which we do not yet officially support in our stable builds (but Spyder 3.3.4, coming soon, should).

Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 19:33
Borders are not displayed in pandas dataframe
CAM Gerlach
@CAM-Gerlach
Feb 27 19:43
@JenyRajasingh_twitter You'll need to be much more specific. What do you mean, borders? Can you share a screenshot? In all pandas dataframes, or just specific ones? What datatype are the columns in question? What version of pandas and Spyder? How did you install it?
Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 19:47
 nct_id                                              title  \

0 NCT00000102 Congenital Adrenal Hyperplasia: Calcium Channe...
1 NCT00000104 Does Lead Burden Alter Neuropsychological Deve...
2 NCT00000105 Vaccination With Tetanus and KLH to Assess Imm...
3 NCT00000106 41.8 Degree Centigrade Whole Body Hyperthermia...
4 NCT00000107 Body Water Content in Cyanotic Congenital Hear...

overall_status study_type completion_date \
0 Completed Interventional NaT
1 Completed Observational NaT
2 Terminated Observational 2012-03-28
3 Unknown status Interventional NaT
4 Completed Observational NaT

I will share the screenshot
CAM Gerlach
@CAM-Gerlach
Feb 27 19:48
@JenyRajasingh_twitter Please edit your message and enclose that block in three backticks (```) above and below it, so it displays properly. What are you trying to show, exactly?
Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 19:58
image.png
In Ipython console,tables are displayed without borders
CAM Gerlach
@CAM-Gerlach
Feb 27 20:01
@JenyRajasingh_twitter What do you expect to see?
Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 20:02
Tables should be displayed with borders
CAM Gerlach
@CAM-Gerlach
Feb 27 20:05
@JenyRajasingh_twitter They are displayed however Pandas would print them to a standard IPython console. Unless you see something other than the above in the standard python or ipython interpreters, or in Jupyter QtConsole (jupyter qtconsole) which Spyder uses to power its Console tabs, then I'm not why you would expect it to behave differently in Spyder, since it is a standards-compliant, interoperable Python environment.
Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 20:07
Thanks for ur quick response
CAM Gerlach
@CAM-Gerlach
Feb 27 20:08
@JenyRajasingh_twitter Are you referring to how they are displayed in a bespoke, non-standard environment like Jupyter Notebook or something?
They have a non-standard output environment where certain packages have mechanisms to display their output in a prettier way. However, if you want to view Numpy arrays, Pandas dataframes, Python lists/tuples/sets/dicts, arbitrary objects and more in an interactive, visual viewer and editor, try Spyder's Variable Explorer, which is far more capable than anything you'll find in Jupyter. You can sort, edit, plot, and interact with many different types of data, all within a GUI.
Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 20:11
My table should look like
image.png
But in Ipython console,table looks like
image.png
CAM Gerlach
@CAM-Gerlach
Feb 27 20:16
@JenyRajasingh_twitter Again, is that from Jupyter Notebook or something? They use a non-standard HTML environment, which allows specific packages that have code written to interact with specifically that environment to output HTML-formatted tables instead of plain text. However, as I discussed above, if you want something like that you should just use Spyder's Variable Explorer, which is far more capable. Please read my comment to you above for more details.
Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 20:17
Last time when i run the same code in spyder, i got the table with border
Thaty why I am asking whether should i change any settings
CAM Gerlach
@CAM-Gerlach
Feb 27 20:18
Also, we are currently planning to add a Viewer pane that replicates the HTML environment so that packages with bespoke code that previously only worked in Jupyter, like Bokeh, can now display interactive visualizations and more right within Spyder and an otherwise standard Python environment. You and other developers can also use it for your own visualizations, and of course it can also work for things like this.
Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 20:18
@JenyRajasingh_twitter
Last time when i run the same code in spyder, i got the table with border
Thaty why I am asking whether should i change any settings
CAM Gerlach
@CAM-Gerlach
Feb 27 20:20

Last time when i run the same code in spyder, i got the table with border

Were you using spyder-notebook? The IPython Console has always displayed dataframes like your second screenshot; I've never seen them with a border.

There is no setting for this in Spyder; it would have to be something in pandas if it actually exists.
Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 20:21
Yes ..In spyder notebook only
CAM Gerlach
@CAM-Gerlach
Feb 27 20:21
That's because now, you're not using Spyder notebook and rather the standard IPython console.
But again, it really doesn't matter since if you want to see your dataframes displayed more nicely, the Variable Explorer is strictly superior alternative in essentially every meaningful respect.
Is there a reason you don't just view them in there instead?
Please check tis link
Recently i have upgraded spyder version
CAM Gerlach
@CAM-Gerlach
Feb 27 20:29

@JenyRajasingh_twitter Please read the answer there. If it worked in the IPython console in your previous version of Spyder, it must have been many, many years out of date.

It is not possible in the IPython Console, only in Spyder notebook, which has some bugs with the latest versions of Spyder (which we might not be able to fix until after Spyder 4 is released in a couple months). But yet again, I'm not sure I understand why you wouldn't just use the Variable Explorer instead, since it displays arrays, dataframes and more a table format with not just borders, but full interactivity, higher quality render and a richer, more functional set of features and supported data types.

Jeny Rajasingh
@JenyRajasingh_twitter
Feb 27 20:30
Then i will start using variable explorer....Thanks for your response
CAM Gerlach
@CAM-Gerlach
Feb 27 20:31
Okay, great! Thanks, and happy Spydering! Let us know if you have more questions in the future.
Saksham Bassi
@sakshambassi
Feb 27 21:50
Hi, is this a correct thread to talk about GSoC ideas?
CAM Gerlach
@CAM-Gerlach
Feb 27 21:51
Sure, you're welcome to ask here @sakshambassi . Which of the listed project(s) interest you?
Saksham Bassi
@sakshambassi
Feb 27 21:51
Thanks, I am interested in the project idea: "Update and improve Spyder-Reports".
How should I start contributing?
CAM Gerlach
@CAM-Gerlach
Feb 27 22:22
@sakshambassi @ccordoba12 would know better than I, but here's a general approach. First, you should install spyder-reports and get familiar with its feel and functionality, along with ensureing you can get it to work to begin with (since it hasn't been fully maintained while we finish Spyder 4). Then, you can take a look at the open issues and consider which you may want to work on to get you familiar with the project and demonstrate your skills and ability to mesh well with our workflow. Finally, you could perhaps talk to @ccordoba12 about finishing some of the languished PRs there or potentially what other smaller tasks might be possible before porting it to the new Spyder 4 plugin API that we have yet to finish.
Thanks!