Trying to download some python scripts from PythonAnywhere to my computer but it keeps opening another browser tab instead - pythonanywhere

I have some python scripts on PythonAnywhere.com that I am trying to download into my computer. Whenever I click the download icon next to the file, it opens into another web tab (Chrome) instead. I'm not sure what I did that caused this because I've been able to download files to my computer for the last couple of weeks but suddenly I cannot. Any help would be appreciated - thank you.

Use your browser right-click menu on the download link to save the file to your disk.

Related

Why am I getting the error: An error occurred while trying to create a file in the destination directory

I don't know why I am getting this error suddenly whilst using vs code. Please help me, Thanks in advance.
P.S(I don't think files can be created in an exe right? I'm not sure after seeing this. Maybe do I have to specify where the file should be created and if yes, please tell me how. Else I'm looking for another answer)
(Edit): I tried downloading the system installation instead of the user installation. The system installer installs for all users on the system and needs administrator privileges unlike the user installer which install vs code only the particular user installing it.
Thanks, Codestrip
error
my solution for this was to set it to always start as administrator, I don't feel like reinstalling vscode (newly installed)
It's not a great solution for those who have multiple users, but I got rid of the error.
Ah, I saw that was a problem within User Permission, there were only 2 options checked. https://prnt.sc/uV-bF_q52Y3Y
I hope my solution will help you.
If you run your "vscode" as admin then you won't see this error
anymore.
Go to your "vscode" install location
If not sure then open the start menu.
Write vscode.
Right click on the icon and click "Open File Location".
In a new window there will be again an icon for the "vscode" right click on the icon
Again and click "open file location".
In another window, there will be an actual vscode's "exe" file.
Right-click on this file and go to the "send" > "send on desktop" option.
On the Desktop right-click on the icon and go to the properties
Click on Advance Option and Check the "Run as Admin" Option
Click Apply and Ok.
Now if you want Right Click on this icon again and select "pin to taskbar".
Hopefully, you won't see this error again.
I also encountered this error.
I tried remove the folder Microsoft VS Code inside C:\Users\<your username>\AppData\Local\Programs, and problem seems resloved
I had the same issue. But I fixed it. just go to this link and add take ownership to your context menu.
https://www.tenforums.com/tutorials/3841-add-take-ownership-context-menu-windows-10-a.html
After adding take ownership just go to vs code main directory and right-click on the Microsoft VS Code folder then press take ownership. After that your problem will be solved.

How to change folder that opened by default in VSCode?

I have small problem with VSCode folder, that opened by default.
Problem description: I start new instance of VSCode (trough File->New Window), and then if I choose File->Open Folder it opens dialog with my Windows user folder as starting point (C:\Users\MyUser)
Question: How can I change that folder in settings (if it possible)? So by default it will show as start point for example D:\development\ ?
At the time I write this answer, this is not possible. There are two problems on Windows, and one problem on Mac and Linux:
VS Code does not provide a default path to the file dialog 1. It does remember the last folder that you opened a file in, but that path cannot be used as a default because it is overwritten constantly.
On Windows only, Electron ignores the default path when creating a file dialog if the default path is a directory 2.
An extension also cannot solve this, because extensions are not allowed to modify the File menu 3.
I think the best option at this point is to pin a folder to the Quick Access area in Windows Explorer, as suggested in a comment, or to put an actual shortcut in the user profile folder.
Workspaces and File > Open Recent may also be helpful if you often open the same folders.
Your main problem is that you are unable to open your specific folder in VScode.
To solve that you can simply open the terminal/cmd in that specific window by just typing cmd in your search bar or just by pressing shift+right-click in that folder.
Now your cmd is open and you just have to type "code ." in the cmd and press enter to open the current folder in your VSCode.
In case that code . doesn't work for you then you have to add the Vscode in the environment variables of your windows.
Visual Studio doesn't provide a specific feature to open a specific path. But there is a solution to your problem. You are saying that you want D:\develpment as a default when you open VS Code. You can go to that specific directory or create shortcut to desktop then click right click on that folder and then click on open with code. If you didnot see open with code then reinstall your VS code and check on open with code when you are reinstalling VS Code.
make a shortcut on the desktop for vscode and then modify it and add the folder after the .exe command. This will default open that folder when you double click on it.
Visual Studio Code can be installed in two ways - User setup and System setup. I strongly believe you have User setup installed in your PC. Try re-installing it System-wide. That should probably fix your problem.
For more information: https://code.visualstudio.com/docs/setup/windows#_user-setup-versus-system-setup
PS: A lot more information is needed, you can share a screenshot of the window and elaborate more on it.

How come I can't open my .html with Live Server in VSCode?

I installed Live Server in VSCode for the first time and am trying to open an .html file with Live Server. I'm following the simple instructions provided here on the official installation page, but to no avail.
I right-click my file in the Explorer as instructed, but "Open With Live Server" doesn't show. I've even tried right-clicking the tab and that doesn't work either. I've quit and re-started VSCode and that didn't work. I set Chrome as my default browser in settings.json and that didn't work. I double checked to make sure Live Server is installed and enabled globally and it is. Please help me figure out what's going on! Thank you!
Oh! I figured it out. I had to open my file by selecting "Open Folder" and then open my folder from there. Then I was able to select my file under the Explorer tab and right-click to open with Live Server. I'm not sure why it worked that way.
It's happened to me few times. My problem was the folder and files names.
Check those names and don't use spaces or weird characters.

run file in browser from vscode

just installed vscode and I'm missing a trick which I think should be obvious but I just can't seem to find the answer.
I run apache as my local test server. When I'm in vscode and have a root folder open I would like to be able to send any file I'm editing to my browser and use the root folder name + relative path to file in the url sent to browser.
so what I actually want to send to browser is full url :
http://localhost/current-root-folder-in-vscode/relative-path-to-file
the file could be the open open one or one listed in vscode explorer which is not open.
suggestions much apprceiated.
p.s. I have searched possible vscode extensions and haven't found anything that seems to do it.
Fixed. I edited View-In-Browser extension locally to make it work the way I want.

Install VSCode in a specific folder

I just downloaded the Visual Studio Code App from https://code.visualstudio.com/ and when I tried to install it, it simply just installed it by itself, without the option to change the installation path.
I have an external harddrive, which is where I want the IDE to be placed instead of the Local Harddrive. How can I change this?
On the VSCode download page select "System Installer" instead of "User Installer". The System installer will prompt you for the install location.
Full credit to Hans Passant for giving the following working solution as a comment.
The installer does very little beyond copying the files, it just creates some Explorer context menu shortcuts ("Open with Code"). Otherwise following Chromium conventions and copying itself to c:\Users\yourname\AppData\Local\Code\app-0.1.0 so it can update itself without you noticing. Boo. So high odds that simply moving that folder to the other drive works just fine, put it anywhere and create a shortcut to Code.exe. If you still want the context menu entry to work then use Regedit and search for "code\app-0.1.0".