These are chat archives for spyder-ide/public

20th
Feb 2019
kevin chicaeme
@KChicaeme_twitter
Feb 20 01:13

hello I have an error in a code:
in this import

import calendar
from datetime import date, datetime, timedelta

and stable the variables:
day = (format (date1.day))
month = (format (date1.month))
year = (format (date1.year)) and an error appears in the latter.

when running the code, it runs normally but this warning appears:

imagen.png
imagen.png
imagen.png
imagen.png
Rahul Raj
@rahul-85
Feb 20 02:38
@CAM-Gerlach I tried to save but the whole output doesn't save. Some of the output can not be saved.
Like as in Linux, we can direct the output to a file, likewise is there any solution in spyder?
CAM Gerlach
@CAM-Gerlach
Feb 20 03:14

@KChicaeme_twitter Your screenshot (specifically the second one) do not show the full error, but it appears to be an issue with using non-ASCII characters for a variable name, data, or something else along those lines (its not clear exactly what from what has been provided; normally, you should copy and paste the full error text from the details in the third screenshot in a code block).

This is due to Python 2 not supporting Unicode properly, so you should either carefully check your data, code, variable names, etc. for non-ASCII characters or (much better) upgrade to Python 3 which has full Unicode support and thus essentially never has these sorts of errors. The latter is particularly preferred since Python 2 is finally going end of life at the end of this year and will no longer be supported (many scientific packages have dropped Python 2 support already), and particularly all new or substantially modified code should be using Python 3 at this point.

I tried to save but the whole output doesn't save.

@rahul-85 Again, how are you trying to save it? As I said before, there are multiple ways to save code in the Console and we need to know specifically what you are trying in order to figure out your problem. Please be very explicit and specific and tell us step by step what commands you tried.

Some of the output can not be saved.

Again, please be much more specific. Does it save to a file? What output does not save? Do you get any error messages or warnings?

Eniola Oyewole
@BetiDev
Feb 20 18:34
Hello
Hello?
CAM Gerlach
@CAM-Gerlach
Feb 20 18:50
@BetiDev Hello, do you have a question about Spyder or need some help?
dla06c
@dla06c
Feb 20 19:14
Hi, I'm just getting started with Python. I'm mostly going to be using it to create tools to work with APIs or perform some basic web-scraping for data. Is this a good IDE to code for such tasks?
CAM Gerlach
@CAM-Gerlach
Feb 20 19:31

@dla06c Of course, we're a little biased, but I'd say there's a good chance it might be, depending on what you're doing. Spyder's primary audience is scientists, engineers and data analysts, but can also be quite helpful to beginners with the Variable Explorer giving you a graphical display (and with the various plot commands, even a visualization) of your data, variables and Python objects. Its Help viewer also allows you to get the documentation for any function with just one button press (or automatically as you type, if you enable that); its Editor and IPython console allow for interactive, iterative execution, allowing you to learn step by step as you walk through your code while still guiding you toward sound development practices. It has essentially all of the primary features of more general purpose/software development IDEs, but is often cited as being much more "lightweight" and less resource-hungry and intimidating even for general development.

Big time, software development oriented suites do currently have better automatic refactoring/completion/analysis tools, project support and debugger capabilities vs. Spyder 3, but Spyder 4 (in the final stages of development, with Betas already available) closes much of the gap in each of those areas. So, as I mentioned, if you're going to be working with data a lot, value step by step learning, exploration and execution, or don't want something too huge and intimidating, Spyder could be a great choice. Conversely, something like PyCharm might be a better choice if you want to go into heavy duty application. particularly GUI application development (although, to note, Spyder itself is primarily developed in Spyder). Regardless of what you choose, we wish you the best of luck, and let us know if you have more questions!

Rondesgr
@Rondesgr
Feb 20 21:36
@CAM-Gerlach I installed Spyder 3.3.3 using Anaconda on a Windows 10 Pro system. I'm using Python 3.7.2. I'm seeing some variable but they seem to be for programs I run before the current program that I'm working on. However, I did notice as I stepped through my code, that variables would show then disappear from the list. The code isn't advanced, I'm just getting started learning def and class functions. And my noobie-ness that might be some of the problem since I'm used to other compliers for C++ and LabVIEW. Thank you for reaching out.