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

Delicious import / add not UTF-8 safe #27

Open
j4n opened this issue May 29, 2011 · 4 comments
Open

Delicious import / add not UTF-8 safe #27

j4n opened this issue May 29, 2011 · 4 comments

Comments

@j4n
Copy link

j4n commented May 29, 2011

When importing from delicious, the gitmark_add.py script chokes on an UTF-8 character (µ) in a tag:

    adding mark None to repo False
    {
        "extended": "", 
        "hash": "....", 
        "description": "micro-OSC | CNMAT", 
        "rights": null, 
        "creator": "delicious:user", 
        "uri": "http://cnmat.berkeley.edu/research/uosc", 
        "private": false, 
        "meta": "....", 
        "time": "2009-02-23T00:07:07Z", 
        "tags": [
            "osc", 
            "\u00b5c", 
            "tm", 
            "pic"
        ]
    }
    osc
    [u'osc']
    µc
    [u'osc', u'\xb5c']
    tm
    [u'osc', u'\xb5c', u'tm']
    pic
    [u'osc', u'\xb5c', u'tm', u'pic']
    tags filename/Users/ja/Documents/gitmarks/public/tags/osc
    tags filename/Users/ja/Documents/gitmarks/public/tags/tm
    tags filename/Users/ja/Documents/gitmarks/public/tags/pic
    Traceback (most recent call last):
      File "./delicious_import.py", line 158, in <module>
        import_delicious_to_local_git(username, password)
      File "./delicious_import.py", line 108, in import_delicious_to_local_git
        err = addToRepo(mark,doPush=False)
      File ".../gitmarks_2/gitmark_add.py", line 107, in addToRepo
        return addToPublicRepo(gitmarksObj, doPush)
      File ".../gitmarks_2/gitmark_add.py", line 159, in addToPublicRepo
        print 'tags filename' + str(filename)
@hugoroy
Copy link

hugoroy commented Aug 13, 2012

Don't know what the issue is exactly but maybe it's related. Running the delcious import got me
all kinds of new gitmarks!!
we have 1000 new marks
adding mark None to repo True
Traceback (most recent call last):
File "delicious_import.py", line 158, in
import_delicious_to_local_git(username, password)
File "delicious_import.py", line 108, in import_delicious_to_local_git
err = addToRepo(mark,doPush=False)
File "/home/hrd/.git/gitmarks_2/gitmark_add.py", line 108, in addToRepo
print "adding mark %d to private repo" %str(gitmarkObj)
NameError: global name 'gitmarkObj' is not defined

@FarMcKon
Copy link
Owner

Yes,
I have seen that before, I spent about an hour on different solutions,
but none of them worked. :(

Recently I read this post, whcih might be the right solution:

http://lucumr.pocoo.org/2012/8/11/codec-confusion/

Work is a bit crazy now, so for the moment I don't have time to test
that fix myself :(

On 8/13/12 10:46 AM, Hugo Roy wrote:

Don't know what the issue is exactly but maybe it's related. Running
the delcious import got me
all kinds of new gitmarks!!
we have 1000 new marks
adding mark None to repo True
Traceback (most recent call last):
File "delicious_import.py", line 158, in
import_delicious_to_local_git(username, password)
File "delicious_import.py", line 108, in import_delicious_to_local_git
err = addToRepo(mark,doPush=False)
File "/home/hrd/.git/gitmarks_2/gitmark_add.py", line 108, in addToRepo
print "adding mark %d to private repo" %str(gitmarkObj)
NameError: global name 'gitmarkObj' is not defined


Reply to this email directly or view it on GitHub
#27 (comment).

@hugoroy
Copy link

hugoroy commented Aug 15, 2012

That's alright. Take your time

@FarMcKon
Copy link
Owner

FarMcKon commented Sep 1, 2012

just dropped some code update to the delicious plugin, fyi.

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

No branches or pull requests

3 participants