Open jqzhangd opened 3 years ago
Hello, Kevin. Run the program to report an error:'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
Me too, how to solve
Temporary workaround:
--- a/notebook_item.py
+++ b/notebook_item.py
@@ -72,7 +72,7 @@ class NotebookItem:
def set_url(self):
if self.Type == 4:
- self.url = 'onenote:https://d.docs.live.net/{0}/Documents/{1}'.format(get_user_uid(), self.Title)
+ self.url = 'onenote:https://d.docs.live.net/{0}/Documents/{1}'.format(get_user_uid(), self.Title.encode('utf-8'))
else:
self.url = 'onenote:#page-id={0}&end'.format(self.GUID)
Hi, I have same error, I don't know python so I don't understand what that mean. Can you explain more clearly what have to do?
Hello, Kevin. Run the program to report an error:'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
alfred 4 How should I solve it?Tanks!
Acsii错误,好像是因为不支持中文搜索
在getNotebooks.py文件,第七行import sys后添加:
reload(sys) sys.setdefaultencoding('utf-8')
即可
Hello, Kevin. Run the program to report an error:'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
Acsii错误,好像是因为不支持中文搜索
在getNotebooks.py文件,第七行import sys后添加:
reload(sys) sys.setdefaultencoding('utf-8')
即可
a/notebook_item
Thank you for your answer. I am not a programmer so I had a big issues in implementing that. But I was successful. So to summary what I done to make OneNote Navigagotr to work in 2022 on M1 Macbook Pro:
Install Python 2 with this guide: https://www.alfredapp.com/help/kb/install-dependencies/ Install edited workflow from this repository:https://github.com/alfredapp/updated-third-party-python2-workflows#workflows Install Code Editor (I choosed Atom) Opened "notebook_item.py" at workflow file path Locate row 75 and edit it so it looks like your suggestion
a/notebook_item
Thank you for your answer. I am not a programmer so I had a big issues in implementing that. But I was successful. So to summary what I done to make OneNote Navigagotr to work in 2022 on M1 Macbook Pro:
Install Python 2 with this guide: Install edited workflow from this repository: Install Code Editor (I choosed Atom) Opened "notebook_item.py" at workflow file path Locate row 75 and edit it so it looks like your suggestion
- self.url = 'onenote:https://d.docs.live.net/{0}/Documents/{1}'.format(get_user_uid(), self.Title.encode('utf-8'))
Thank you for your detailed additional explanation. My bad to treat others like programmers.
Hello, Kevin. Run the program to report an error:'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
alfred 4 How should I solve it?Tanks!