question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with Desktop folder on seperate drive

See original GitHub issue

I have my Desktop folder located on the E drive, and was receiving

Traceback (most recent call last): File "E:\Desktop\Development\Lyndor-master/run.py", line 110, in <module> main() File "E:\Desktop\Development\Lyndor-master/run.py", line 31, in main schedule_download(url) File "E:\Desktop\Development\Lyndor-master/run.py", line 47, in schedule_download download_course(url) File "E:\Desktop\Development\Lyndor-master/run.py", line 74, in download_course desktop_folder_path = install.folder_path("Desktop") File "E:\Desktop\Development\Lyndor-master\install.py", line 46, in folder_path os.chdir(os.path.expanduser('~/' + folder)) FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\Hunter/Desktop'

I was able to fix this by replacing line 46 in install.py

os.chdir(os.path.expanduser('~/' + folder)) with os.chdir(os.path.expanduser('E:\' + folder))

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TFWolcommented, Apr 29, 2018

@ankitsejwal Maybe we should close this due to no reply; I’ve seen similar github repos use a tag for no replies to keep things tidy. 🤷‍♂️

1reaction
TFWolcommented, Apr 10, 2018

@rackyman Odd you are getting an error; it works for me on both Win7 and Win10. os.environ['USERPROFILE'] seems to work as well so a change should be fine.

In the meantime could you open a python interpreter python and supply the output of the following?

import sys
import os

print(sys.version_info)
path1 = os.path.expanduser('~')
path2 = os.environ['USERPROFILE']
if path1 == path2:
   print("Path1: " + path1 + " and Path2: " + path2 + " match")
else:
   print("Path1: " + path1 + " and Path2: " + path2 + " do not match")
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Move Desktop Folder to Another Drive on Windows ...
Switch to the "Location" tab and click the "Move" button. Step 4. Now, select the location on any drive (except external drive) and...
Read more >
Desktop Folder move to another drive trouble
A new folder was not created on the E:\ drive, it just put the only thing on the desktop on the new drive...
Read more >
How To Move Desktop, Downloads & Documents To Another ...
A detailed guide to move desktop, downloads, documents, pictures, music and videos folders to another drive in Windows 10, Windows 7 and Windows...
Read more >
How to Move the Desktop or Document Folder to Another ...
Open File Explorer and browse to your user account's folder. · Go to the Location tab, and click on the Move button. ·...
Read more >
Fix problems in Drive for desktop - Computer - Google Support
On your computer, open Drive for desktop. · Go to Preferences and then select the folder and uncheck Drive and/or Photos.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found