-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
OneDrive Path #1253
Comments
yes, the fix was only for windows... |
Actually, I hear it may not have been solved on Windows neither (may have only been the SharePoint version). |
I am using xlwings V0.18.0. I was not having any issues until Windows 10 updates (KB4551762 & KB4541338) were applied this week. |
What issue do you see exactly? |
I am really having trouble pinning down the issue. The error I get reads
as follows:
```
File "C:\Users\Greg\OneDrive - Queen's
University\Python\Projects\Utilities\spreadsheet_tools.py", line 109, in
open_book
data_book = exel_app.books.open(str(file_name))
File
"C:\Users\Greg\anaconda3\envs\Standard\lib\site-packages\xlwings\main.py",
line 2884, in open
if not os.path.samefile(impl.fullname, fullname):
File "C:\Users\Greg\anaconda3\envs\Standard\lib\genericpath.py", line
100, in samefile
s1 = os.stat(f1)
OSError: [WinError 123] The filename, directory name, or volume label
syntax is incorrect:
'https://queensuca-my.sharepoint.com/personal/gs13_queensu_ca/Documents/Work/Plan
Checking tools/DVH/Constraints
<https://queensuca-my.sharepoint.com/personal/gs13_queensu_ca/Documents/Work/Plan%20Checking%20tools/DVH/Constraints>
Table Entry Form.xlsx'
The thread 'MainThread' (0x1) has exited with code 0 (0x0).
The program 'pythonw.exe' has exited with code 0 (0x0).
```
I moved the script and excel file (but not the imported module) to dropbox
and it worked.
I set a breakpoint just before the line:
data_book = exel_app.books.open(str(file_name))
and did the following:
>> file_name
WindowsPath("C:/Users/Greg/OneDrive - Queen's University/Work/Plan Checking
tools/DVH/Constraints Table Entry Form.xlsx")
>> path = Path(r"C:\Users\Greg\OneDrive - Queen's University\Work\Plan
Checking tools\DVH\Constraints Table Entry Form.xlsx")
>> data_book = exel_app.books.open(str(path))
The file opened with no issue.
However, when I ran the line:
>> data_book = exel_app.books.open(str(file_name))
The application crashed with the error given above.
So far I have not been able to identify the issue.
Greg Salomons
…On Sat, Mar 14, 2020 at 3:48 PM Felix Zumstein ***@***.***> wrote:
What issue do you see exactly?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1253 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIB2YJ5IPVVRSZ44GWBK4ETRHPNPBANCNFSM4KRFA2KQ>
.
|
Looks like there are some cases where it still breaks. Can you try to use |
Actually, you'd need to have the spreadsheet open first (just for testing). |
Hello, I have the same issue since the last Windows Update this week. It works perfectly fine outside OneDrive, but as soon as i'm using oneDrive files, xlwings addin doesn't work properly and cannot recognize my folder path. For exemple the Addin "Run Main" button is not working because it can't find the proper module name in its path. I'm working outside onedrive waiting for a fix. Take care of you |
Can you add the folder of where your module is to the PYTHONPATH in the addin? let me know if that works then |
Yes, this is working when i add the folder in the PYTHONPATH. This is a good temporary fix, i'll be able to sync my data with onedrive. Thankyou |
You can also set the PYTHONPATH to |
I will do that, thanks again for your precious help! |
see also: #1275 |
Mac Catalina
0.17.1, Office 365, Python 3.8
Describe your issue (incl. Traceback!)
(Similar to #1069 and #215)
When the excel file is saved in OneDrive, ThisWorkbook.FullPath returns a UNC path like:
https://d.docs.live.net/4ffb1cf57289ab33/myproject
instead of:
/users/john/onedrive/myproject
Side issue - the VBA function
ToPosixPath()
swaps the / and : and converts this to:/https/::d.docs.live.net:4ffb1cf57289ab33:myproject
Even if the OneDrive path was converted correctly it still wouldn't work though, which is the real issue.
This seems to have been resolved for windows (as per #215), but not mac yet?
Not a major issue, can just hard code the path for now, but wanted to raise it just in case anyone else has same issue or knows a fix.
The text was updated successfully, but these errors were encountered: