callowayproject / django-supertagging Goto Github PK
View Code? Open in Web Editor NEWauto tagging application
License: Apache License 2.0
auto tagging application
License: Apache License 2.0
Django SuperTagging Inspired by django-tagging, this project came up when we wanted to automate content tagging. Using OpenCalais service we are able to retrieve a large array of data, including basic entities (tags) and relations (attributes about the tag). Prerequisites - simplejson ( http://pypi.python.org/pypi/simplejson )
django-supertagging crash when I try to save text with accents in my database fields :
I try to save the following string u'this is a test with an accent é'
And I got the following exception
Environment:
Request Method: POST
Request URL: http://localhost:8000/admin/matchfwd_email/email/21/
Django Version: 1.2.3
Python Version: 2.6.1
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django_extensions',
'taggit',
'supertagging',
'django.contrib.admin',
'matchfwd.profiles',
'matchfwd.matchfwd_email']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/Library/Python/2.6/site-packages/django/core/handlers/base.py" in get_response
response = callback(request, _callback_args, *_callback_kwargs)
return self.admin_site.admin_view(view)(_args, *_kwargs)
response = view_func(request, _args, *_kwargs)
response = view_func(request, _args, *_kwargs)
return view(request, _args, *_kwargs)
return decorator(bound_func)(_args, *_kwargs)
response = view_func(request, _args, *_kwargs)
return func(self, _args2, *_kwargs2)
res = func(_args, *_kw)
self.save_model(request, new_object, form, change=True)
obj.save()
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
created=(not record_exists), raw=raw)
response = receiver(signal=self, sender=sender, **named)
process(instance)
if settings.ST_DEBUG: raise Exception(e)
Exception Type: Exception at /admin/matchfwd_email/email/21/
my supertagging SETTINGS :
SUPERTAGGING_DEBUG = True
SUPERTAGGING_ENABLED = True
SUPERTAGGING_AUTO_PROCESS = True
SUPERTAGGING_PROCESS_RELATIONS = True
SUPERTAGGING_PROCESS_TOPICS = True
SUPERTAGGING_RESOLVE_PROPERTY_KEYS = True
SUPERTAGGING_ONLY_NON_TAGGED_OBJECTS = False
SUPERTAGGING_MIN_RELEVANCE = 200
SUPERTAGGING_USE_FREEBASE = False
SUPERTAGGING_MARKUP = False
SUPERTAGGING_REGISTER_MODELS = False
SUPERTAGGING_MODULES = {
'matchfwd_email.email':
{'fields':[
{'name': 'body'},
],
},
}
The PickledObjectField crash when trying to tag the following value : 'Java Tech Lead - Montreal' since OpenCalais detect the location Montreal/Québec/Canada. When SuperTagging try to persist the instances fields. The PickledObjectField crash because it is using the str method.
Objects that doesn't match the match_kwargs setting are add to the SuperTagProcessQueue anyway.
here's my SUPERTAGGING_MODULES
SUPERTAGGING_MODULES = {
'app.model':
{'fields':[
{'name':'title'},
{'name':'job_title'},
{'name':'description'},
],
'match_kwargs':{'source_type__in':['SOURCE_TYPE_1',]}
},
}
Now when I create object with a different source type they are add to the process queue anyway which doesn't seems right.
I am using 0.4.11
I don't have the traceback, I was fixin a bug in a production server. Anyway the error is simple, 'parse_tag_input' is not avalilable in utils.py and it is called in line 65, this method can be imported from django.contrib.tagging.utils.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.