Skip to content
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

Can't save an html file in Spyder #17577

Closed
9 of 10 tasks
muriloasouza opened this issue Mar 30, 2022 · 7 comments
Closed
9 of 10 tasks

Can't save an html file in Spyder #17577

muriloasouza opened this issue Mar 30, 2022 · 7 comments

Comments

@muriloasouza
Copy link

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Try to create a new file (Ctrl + N), and write some html code:

<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
        <p>Body</p>
</body>
</html>

If i try to save it (Ctrl+S) and rename to something like my_file.html, it does not save and the following circle made by small dots doesn't stop turning.

image

What steps reproduce the problem?

  1. Create new file (Ctrl + N)
  2. Save the following file after adding some html code (Ctrl + S)

What is the expected output? What do you see instead?

The small circle made by dots doesn't stop running (file isn't saved).

Versions

  • Spyder version: 5.2.2
  • Python version: 3.10.4
  • Qt version: 5.9.7
  • PyQt version: 5.9.2
  • Operating System name/version: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0;<8.0.0        :  7.29.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.1.0 (OK)
numpydoc >=0.6.0              :  1.2 (OK)
paramiko >=2.4.0              :  2.8.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0                :  2.12.2 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.3.2;<1.4.0          :  1.3.3 (OK)
pylsp_black >=1.0.0           :  1.0.0 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=1.0.2             :  1.0.3 (OK)
qtconsole >=5.2.1;<5.3.0      :  5.2.2 (OK)
qtpy >=1.5.0                  :  1.11.2 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  58.0.4 (OK)
sphinx >=0.6.6                :  4.4.0 (OK)
spyder_kernels >=2.2.1;<2.3.0 :  2.2.1 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=17                      :  22.3.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=2.0.0            :  None (NOK)
numpy >=1.7                   :  None (NOK)
pandas >=1.1.1                :  None (NOK)
scipy >=0.17.0                :  None (NOK)
sympy >=0.7.3                 :  None (NOK)

@dalthviz
Copy link
Member

dalthviz commented Mar 30, 2022

Hi @muriloasouza thank you for the feedback! I was unable to reproduce this with the Windows installer standalone version (link to the executable in our release page: https://github.com/spyder-ide/spyder/releases/tag/v5.2.2)

Also, how did you install Spyder? If you are using the Anaconda distribution, could you try creating a new env using only conda-forge packages. You should be able to do that running from an Ananconda prompt something like this:

conda create -n spyder-env -c conda-forge python=3.9 spyder=5.2.2

Any new info in order to reproduce this is greatly appreciated, let us know any new info or if something of the above helps

Edit: Add missing channel flag to the suggested command since Spyder >5.1.5 is only available in the conda-forge channel

@muriloasouza
Copy link
Author

Hello @dalthviz, was a fresh conda environment.

I installed everything like this:

conda create -n newenv
conda install -c conda-forge python
conda install -c conda-forge spyder
conda update qt (i was facing a problem were i couldn't open Spyder using the .exe file. Solved that by updating qt)

I also have an older environment (created last year) that happens the same problem. I don't know if this is helpful at all, but here are the info about this older env:

Versions

  • Spyder version: 5.2.2
  • Python version: 3.8.0
  • Qt version: 5.9.7
  • PyQt version: 5.9.2
  • Operating System name/version: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  8.1.1 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.8.9 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.1.0 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
paramiko >=2.4.0              :  2.8.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0                :  2.12.2 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.3.1;<1.4.0          :  1.3.2 (OK)
pylsp_black >=1.0.0           :  None (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.1 (OK)
qtawesome >=1.0.2             :  1.1.1 (OK)
qtconsole >=5.2.1;<5.3.0      :  5.2.1 (OK)
qtpy >=1.5.0                  :  1.11.3 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  58.0.4 (OK)
sphinx >=0.6.6                :  4.3.1 (OK)
spyder_kernels >=2.2.0;<2.3.0 :  2.2.0 (OK)
textdistance >=4.2.0          :  4.2.2 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=17                      :  22.3.0 (OK)

# Optional:
cython >=0.21                 :  None (OK)
matplotlib >=2.0.0            :  3.5.1 (OK)
numpy >=1.7                   :  1.21.5 (OK)
pandas >=1.1.1                :  1.4.1 (OK)
scipy >=0.17.0                :  1.7.3 (OK)
sympy >=0.7.3                 :  None (OK)

About your suggestion, i couldn't make it work, got this error:

image

@dalthviz
Copy link
Member

Thank you @muriloasouza for the new info and also sorry I forgot to add to my command suggestion the -c conda-forge flag 😅 The actual command I wanted to suggest was something like:

conda create -n spyder-dev -c conda-forge python=3.9 spyder=5.2.2

Could you try this and check again? Thanks!

@muriloasouza
Copy link
Author

muriloasouza commented Apr 1, 2022

Hello @dalthviz. I tried with that command, and the problem persists:

image

I have noticed that if i create a .txt file in any folder (lets name the file as test), open it in Spyder, try to Save As (Ctrl+Shift+S) and rename it to test.html, it works, the file get saved as html. But creating a new file directly in Spyder and try to save it as html i get the problem where it does not save it.

@dalthviz
Copy link
Member

dalthviz commented Apr 4, 2022

I'm not being able to reproduce but just in case this is what I'm doing:

save

Maybe the way to do the save and trigger the error is different from what I'm doing? Could you post here a gif to check how this is happening to you @muriloasouza ? Let us know!

@dalthviz
Copy link
Member

@muriloasouza by any chance do you have the autoformat on save option enabled? If that is the case, maybe this could be related with #17836

@muriloasouza
Copy link
Author

Hello @dalthviz thanks for the info!

Yes, i had autoformat on save enabled. I tried to disable it now, and i could save the html file.

@spyder-bot spyder-bot reopened this May 12, 2022
@ccordoba12 ccordoba12 reopened this Sep 9, 2022
@ccordoba12 ccordoba12 added this to the v5.4.0 milestone Sep 9, 2022
@ccordoba12 ccordoba12 changed the title Can't save a html file in Spyder Can't save an html file in Spyder Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants