Unable to save html files

Visual Studio not able to save html file edit

Weird issue, just tried to save a static html file that I had made a quick edit to, using Visual Studio 2015, and a message pops up that says «file already exists do you want to overwrite». I click «yes» button, and get another message that says «The process cannot access file «c:/nnnnn.html», the file is being used by another process». What gives? Is this a bug? Quick update: Only happens with .htm file extensions. The .html file extension works as expected.

1 Answer 1

Only happens with .htm file extensions. The .html file extension works as expected.

A bit more detail: As it turns out, IIS Express process was still running in the system tray even though the Debugger had ended. I have found this to be common in this newer version of Visual Studio, IIS Express stays running, perhaps for faster starts when debugging. But I have had a few issues where I have had to go back and actually close it to complete some other task. Funny that it can be running and does not disrupt saving .html files but does disrupt saving .htm files.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Читайте также:  Os curdir python 3

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.27.43548

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

html failed to save #74774

html failed to save #74774

Comments

step 1 : modifying and save ‘.html’ files ,
step 2 , 3, or 4 : only to save, file content is missing;

Notice:
Failed to save «example.html»: Unable to write to file (Unknown (FileSystemError): Error: EBUSY: resource busy or locked, open ‘e:\example.html’)

VS Code version: Code 1.34.0 (a622c65, 2019-05-15T21:59:37.030Z)
OS version: Windows_NT x64 10.0.17763

System Info

Item Value
CPUs Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz (6 x 3000)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.92GB (5.85GB free)
Process Argv
Screen Reader no
VM 0%

Extensions (33)

Extension Author (truncated) Version
lua-debug act 1.3.6
css-compressor bes 0.0.2
gltf-vscode ces 2.2.5
npm-intellisense chr 1.3.0
jsrefactor cms 2.18.2
vscode-devtools-for-chrome cod 0.0.5
vscode-svgviewer css 2.0.0
vscode-eslint dba 1.9.0
es7-react-js-snippets dsz 2.3.0
tslint eg2 1.0.43
vscode-npm-script eg2 0.3.7
code-runner for 0.9.10
beautify Hoo 1.5.0
emoji-code idl 0.7.5
compareit in4 0.0.2
docthis joe 0.7.1
vscode-language-pack-zh-hans MS- 1.34.2
python ms- 2019.5.17517
cpptools ms- 0.23.1
csharp ms- 1.19.1
vscode-typescript-tslint-plugin ms- 1.1.0
debugger-for-chrome msj 4.11.3
color-highlight nau 2.3.0
vetur oct 0.21.0
open-html-in-browser pea 1.2.0
LiveServer rit 5.6.1
indenticator Sir 0.6.0
code-spell-checker str 1.7.12
vscodeintellicode Vis 1.1.6
vscode-icons vsc 8.7.0
quokka-vscode Wal 1.0.222
wallaby-vscode Wal 1.0.128
JavaScriptSnippets xab 1.7.2

(2 theme extensions excluded)

The text was updated successfully, but these errors were encountered:

Is the log information?
I saw that the log recorded a variable undefined, and I failed to save the HTML file.
The following is the log I copied.

[2019-06-06 14:13:41.039] [renderer6] [error] Unable to write to file (Unknown (FileSystemError): Error: EBUSY: resource busy or locked, open ‘e:\ThreeJSProjects\three.js\examples\webgl_lines_colors.html’): Error: Unable to write to file (Unknown (FileSystemError): Error: EBUSY: resource busy or locked, open ‘e:\ThreeJSProjects\three.js\examples\webgl_lines_colors.html’)
at b. (file:///D:/ProgramFiles/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3339:893)
at Generator.throw ()
at a (file:///D:/ProgramFiles/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:34:505) [2019-06-06 14:18:03.570] [renderer6] [error] Cannot read property ‘peekBack’ of undefined: TypeError: Cannot read property ‘peekBack’ of undefined
at IndentSpy._peekBack (C:\Users\SDF.vscode\extensions\sirtori.indenticator-0.6.0\out\src\extension.js:250:28)
at IndentSpy._buildHoverString (C:\Users\SDF.vscode\extensions\sirtori.indenticator-0.6.0\out\src\extension.js:234:35)
at IndentSpy._buildHoverprovider (C:\Users\SDF.vscode\extensions\sirtori.indenticator-0.6.0\out\src\extension.js:215:28)
at Object.provideHover (C:\Users\SDF.vscode\extensions\sirtori.indenticator-0.6.0\out\src\extension.js:205:29)
at define.provideHover.a.asPromise (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:575:479)
at t.asPromise.Promise (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:53:320)
at new Promise ()
at Object.t.asPromise (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:53:292)
at S.provideHover (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:575:450)
at define.$provideHover._withAdapter.e (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:592:165)
at j._withAdapter (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:588:126)
at j.$provideHover (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:592:143)
at d._doInvokeHandler (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:644:1006)
at d._invokeHandler (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:644:698)
at d._receiveRequest (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:643:293)
at d._receiveOneMessage (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:642:141)
at define.constructor._protocol.onMessage.e (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:640:400)
at u.fire (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:720)
at a (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:176:766)
at e (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:176:812)
at u.fire (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:720)
at n.constructor.e.onMessage.e (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:748:721)
at u.fire (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:720)
at a (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:176:766)
at e (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:176:812)
at u.fire (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:720)
at y._receiveMessage (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:185:670)
at define.constructor._socketDisposables.push._socketReader.onMessage.e (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:182:981)
at u.fire (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:720)
at f.acceptChunk (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:179:532)
at define.constructor._register._socket.onData.e (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:178:869)
at Socket.t (d:\ProgramFiles\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:187:141)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:279:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onread (net.js:636:20)

Источник

savewidget from htmlwidget in R , cannot save html file in another folder

I have a map leaflet that I want to save in an html file in a specific folder. I am using Windows 7. I tried the following :

library(htmlwidgets) saveWidget(map_leaflet, file="ressources/test.html") library(htmlwidgets) saveWidget(map_leaflet, file="ressources\\test.html") library(htmlwidgets) path_name  

As an error message, depending on the Rstudio session, I either have 1) Error in setwd(dir) : cannot change working directory 2) Cannot find path When I only save like this :

library(htmlwidgets) saveWidget(map_leaflet, file="test.html") 

it sounds like the directory ressources does not exist from the location where the code is being executed. Did you try checking getwd() in R just before running this code to make sure you're running it from the correct directory, and dir() to make sure that ressources exists at that location? If both of those look correct, a less favorable solution may be to use setwd("ressources") to change to that directory before trying to save.

Hi there, so I tried getwd() and dir() and ressources do appear correctly. I then tried this path

My tips were just troubleshooting. It still sounds like you're not executing the code from where you think you are. But as you found, using full paths, and using file.path() are more surefire ways to pass paths safely. You might also want to look at the normalizePath() function. It can help you get the absolute path, and can also let you know if the path doesn't exist or is incorrect. Try these and you will see: normalizePath(".") , normalizePath("~") , normalizePath("./foo")

Источник

Cannot save .html file in eclipse

I'm working on a javascript project in eclipse. The static html and javascript files need to access my service's restful end points, so I put those in the java project with those end-points, so I could access them without cross domain issues. All of a sudden, though, if I try to save a change to my html file, I can't unless I stop the java application from running. The sequence of events is like this:

Run java web app with Jetty Can save changes to html file. Open html file in chrome with url: http://127.0.0.1:8901/myapp/myapp-admin.html Cannot save changes to html file. Close chrome. Still can't save changes. Stop jetty running in eclipse. Can save changes. 
Save could not be completed. Try File > Save As. if the problem persists. Reason: Could not write file: C:\\myapp-admin.html (The requested operation cannot be performed on a file with a user-mapped section open) 
Save could not be completed. Could not write file:

The only thing I changed was how these were mapped in the web.xml. Basically, before I was rendering them the spring-way using a spring controller, etc. Now I'm rendering them statically, using:

  spring org.springframework.web.servlet.DispatcherServlet  contextClass org.springframework.web.context.support.AnnotationConfigWebApplicationContext   spring /   30  

Can anyone help me figure out what's wrong here, and if there's a way to get it working like I want it to?

Источник

Оцените статью