Skip to content
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

Lists are still not cached in some cases #113

Closed
idpaterson opened this issue Mar 31, 2016 · 8 comments
Closed

Lists are still not cached in some cases #113

idpaterson opened this issue Mar 31, 2016 · 8 comments
Assignees
Labels
Milestone

Comments

@idpaterson
Copy link
Owner

In #112 it was discovered that lists named with non-ascii characters such as the umlaut ü can cause the lists to not cache properly to lists.cpickle. This in turn causes features that rely on the list cache to fail.

@idpaterson idpaterson self-assigned this Mar 31, 2016
@idpaterson idpaterson added the bug label Mar 31, 2016
@idpaterson idpaterson added this to the 0.6 milestone Mar 31, 2016
@idpaterson idpaterson changed the title Lists with non-ascii accented characters may cause errors in the workflow Lists named with non-ascii accented characters may cause errors in the workflow Mar 31, 2016
@idpaterson
Copy link
Owner Author

The list cache was still being written from a background thread based on the threading of child syncs. This appears to be unrelated to the accented text. It was more of a case of the _wl-reset not working and then the sync only sometimes writing the lists cache file.

@vr2nr
Copy link

vr2nr commented Apr 3, 2016

I am getting a "Error in Workflow" (see attached) as soon as I type "wl".

I have a list of various things, and deal a lot with Chinese language. I do not see any characters in the list as a title, but there might be strange characters within the notes, etc.

is this list cache problem related? I was using the workflow without any problem up until recently.

If there is something I can do to test this, etc., please let me know.

screen shot 2016-04-03 at 11 51 10 pm

@idpaterson
Copy link
Owner Author

Odd... this problem wasn't actually related to the special characters. It's difficult to tell what the error is, can you open up Alfred's debugging console for the Wunderlist workflow? It should provide a more detailed error.

@vr2nr
Copy link

vr2nr commented Apr 3, 2016

here is the log after the failure...
Starting debug for 'Wunderlist'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 02:39:07 workflow.py:1681 DEBUG Data prefs stored in cpickle format
02:39:07 workflow.py:1696 DEBUG Stored data loaded from : /Users/ecurran/Library/Application Support/Alfred 2/Workflow Data/com.ipaterson.alfred.wunderlist/prefs.cpickle
02:39:07 workflow.py:2154 DEBUG Workflow version : 0.5.4
02:39:07 workflow.py:1557 DEBUG Reading settings from /Users/ecurran/Library/Application Support/Alfred 2/Workflow Data/com.ipaterson.alfred.wunderlist/settings.json ...
02:39:07 workflow.py:2172 ERROR No JSON object could be decoded
Traceback (most recent call last):
File "/Users/ecurran/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3B5B7C0B-058B-4B57-9078-BE1504B65C64/workflow/workflow.py", line 2162, in run
self.check_update()
File "/Users/ecurran/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3B5B7C0B-058B-4B57-9078-BE1504B65C64/workflow/workflow.py", line 2404, in check_update
if not force and not self.settings.get('workflow_autoupdate', True):
File "/Users/ecurran/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3B5B7C0B-058B-4B57-9078-BE1504B65C64/workflow/workflow.py", line 1559, in settings
self._default_settings)
File "/Users/ecurran/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3B5B7C0B-058B-4B57-9078-BE1504B65C64/workflow/workflow.py", line 974, in __init

self._load()
File "/Users/ecurran/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3B5B7C0B-058B-4B57-9078-BE1504B65C64/workflow/workflow.py", line 986, in _load
for key, value in json.load(file_obj, encoding='utf-8').items():
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 290, in load
*_kw)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 351, in loads
return cls(encoding=encoding, *_kw).decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
02:39:07 workflow.py:2190 DEBUG Workflow finished in 0.052 seconds.

@idpaterson
Copy link
Owner Author

Ah, yeah that is a problem with alfred-workflow that ought to have been fixed. What's your current workflow version (wl:about)? You should be able to fix that by deleting the /Users/ecurran/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.ipaterson.alfred.wunderlist/settings.json file - nothing important there.

@idpaterson idpaterson changed the title Lists named with non-ascii accented characters may cause errors in the workflow Lists are still not cached in some cases Apr 4, 2016
@idpaterson
Copy link
Owner Author

The most recent cause of the list cache not being created as discussed at the top of this thread is now fixed in 0.6.0-beta.1.

@vr2nr
Copy link

vr2nr commented Apr 5, 2016

I deleted and reinstalled and it is working now. Many thanks.

On Mon, Apr 4, 2016 at 2:43 AM, Ian Paterson notifications@github.com
wrote:

Ah, yeah that is a problem with alfred-workflow that ought to have been
fixed. What's your current workflow version (wl:about)? You should be
able to fix that by deleting the /Users/ecurran/Library/Application
Support/Alfred\ 2/Workflow
Data/com.ipaterson.alfred.wunderlist/settings.json file - nothing
important there.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#113 (comment)

@idpaterson
Copy link
Owner Author

@vr2nr please let me know what your workflow version is, at wl:about so that I can track down the cause of that settings file error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants