Re: KeyError: 'deferrable'

2020-12-28 Thread KUMBHAGIRI SIVAKRISHNA
on3.8/site-packages/django/db/backends/ddl_references.py", >> line 200, in __str__ >> return self.template % self.parts >> KeyError: 'deferrable' >> >> I am getting above error When I run command 'python manage.py migrate' >> >> -- &g

Re: KeyError: 'deferrable'

2020-12-28 Thread AMRIT SHAHI
Specify the python version On Mon, Dec 28, 2020, 7:01 PM KUMBHAGIRI SIVAKRISHNA < kumbhagirish...@gmail.com> wrote: > File > "/home/sivakrishna/.local/lib/python3.8/site-packages/django/db/backends/ddl_references.py", > line 200, in __str__ > return self.temp

KeyError: 'deferrable'

2020-12-28 Thread KUMBHAGIRI SIVAKRISHNA
File "/home/sivakrishna/.local/lib/python3.8/site-packages/django/db/backends/ddl_references.py", line 200, in __str__ return self.template % self.parts KeyError: 'deferrable' I am getting above error When I run command 'python manage.py migrate' -- You receive

Re: return self.template % self.parts KeyError: 'deferrable'

2020-12-25 Thread Kris A. Stern
What an assertive and affirmation plus accurate answer, Kasper, as usual. Bravo! Cheers, K.S. On Sat, 26 Dec 2020 at 04:11, Kasper Laudrup wrote: > Hi Kumbhagiri, > > On 24/12/2020 15.23, KUMBHAGIRI SIVAKRISHNA wrote: > > return self.template % self.parts > > KeyError: &#

Re: return self.template % self.parts KeyError: 'deferrable'

2020-12-25 Thread Kasper Laudrup
Hi Kumbhagiri, On 24/12/2020 15.23, KUMBHAGIRI SIVAKRISHNA wrote: return self.template % self.parts KeyError: 'deferrable'  I am getting above error when I tried python manage.py Since it seems like you're the only one getting that error, it is most likely because there&#

return self.template % self.parts KeyError: 'deferrable'

2020-12-24 Thread KUMBHAGIRI SIVAKRISHNA
return self.template % self.parts KeyError: 'deferrable' I am getting above error when I tried python manage.py -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from i

Re: Django Session KeyError

2020-02-26 Thread Naveen Arora
one, index_col=None) >>>> request.session['ts_datset'] = dataset.to_json(orient= >>>> 'values') >>>> print(dataset.to_json(orient='values')) >>>> request.session['ts_dataset_copy&#x

Re: Django Session KeyError

2020-02-26 Thread Guy NANA
ssion['ts_dataset_copy'] = dataset.to_json(orient= >>> 'values') >>> print(request.session['ts_dataset_copy']) >>> return HttpResponse(dataset.to_json(orient='values')) >>> Post output of this plus th

Re: Django Session KeyError

2020-02-26 Thread Naveen Arora
esponse(dataset.to_json(orient='values')) >> Post output of this plus the below one >> def cv_classification(request, kfolds, dissimilarity_func, windows_length >> =0, noisy_law="", mu=0,std=0): >> noisy_law = noisy_law.lower() >>

Re: Django Session KeyError

2020-02-26 Thread Guy NANA
Hi! Please find bellow the outputs. When I was using sessions stored in cache (specially in Memcached) all things were working good until I wanted to upload a data set with larger volume of data : it wasn't be possible to put them in cache. Training dataset uploaded : Coffee training dataset sav

Re: Django Session KeyError

2020-02-26 Thread Guy NANA
ty_func, windows_length, noisy_law, mu, std) return JsonResponse(predictions, safe=False) On Tuesday, 25 February 2020 03:47:25 UTC+5:30, Guy NANA wrote: I have an angular frontend app which send file to django backend which data is setting in django session. After I send a httpreque

Re: Django Session KeyError

2020-02-26 Thread Guy NANA
dictions = cv_classify(df, kfolds, dissimilarity_func, > windows_length, noisy_law, mu, std) > return JsonResponse(predictions, safe=False) > > On Tuesday, 25 February 2020 03:47:25 UTC+5:30, Guy NANA wrote: >> >> I have an angular frontend app which send f

Re: Django Session KeyError

2020-02-25 Thread Naveen Arora
arity_func, windows_length, noisy_law, mu, std) return JsonResponse(predictions, safe=False) On Tuesday, 25 February 2020 03:47:25 UTC+5:30, Guy NANA wrote: > > I have an angular frontend app which send file to django backend which > data is setting in django session. Afte

Re: Django Session KeyError

2020-02-25 Thread Guy NANA
ar app to django app ? >> >> Le mardi 25 février 2020 13:29:53 UTC+1, Pankaj Sharma a écrit : >> >>> Make sure your line request.session['ts_dataset_copy'], print anything >>> above it, also make sure you are using POST method in forms (method = >>

Re: Django Session KeyError

2020-02-25 Thread Juan Pablo Romero Bernal
5, 2020 at 3:47:25 AM UTC+5:30, Guy NANA wrote: >>> >>> I have an angular frontend app which send file to django backend which >>> data is setting in django session. After I send a httprequest to django >>> backend to make ML tratements on that data and get the

Re: Django Session KeyError

2020-02-25 Thread Guy NANA
; On Tuesday, February 25, 2020 at 3:47:25 AM UTC+5:30, Guy NANA wrote: >> >> I have an angular frontend app which send file to django backend which >> data is setting in django session. After I send a httprequest to django >> backend to make ML tratements on that data a

Re: Django Session KeyError

2020-02-25 Thread Pankaj Sharma
le to django backend which > data is setting in django session. After I send a httprequest to django > backend to make ML tratements on that data and get the results. But I've a > 500 sever error: keyerror 'ts_dataset_copy': KeyError: 'ts_dataset_copy' > [24

Django Session KeyError

2020-02-24 Thread Guy NANA
I have an angular frontend app which send file to django backend which data is setting in django session. After I send a httprequest to django backend to make ML tratements on that data and get the results. But I've a 500 sever error: keyerror 'ts_dataset_copy': KeyError: '

KeyError for CSRF middleware during processing an exception response

2019-09-11 Thread Most. Runa
Fuck me +8801737940981 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https

KeyError for CSRF middleware during processing an exception response

2019-09-11 Thread Timothy Gates
If an exception response occurs during the middleware processing it looks like the CSRF middleware layer can obscure the issue by getting a KeyError exception of its own. The request.META does not contain the CSRF_COOKIE but the response handling seems to assume it has already been set. I get

Re: KeyError at /admin/newapp/profile/add/ and Search Error --- Related Field got invalid lookup: icontains

2019-05-27 Thread Balaji Shetty
2 PM Derek wrote: > Your first error refers to a ProfileForm; you need to post the form > definition code here as well. > > On Sunday, 26 May 2019 20:48:09 UTC+2, Balaji wrote: >> >> Hi >> >> Here i want to exclude some model filed depending upon type of User. >> &g

Re: KeyError at /admin/newapp/profile/add/ and Search Error --- Related Field got invalid lookup: icontains

2019-05-27 Thread Derek
not use fieldset and comment the code, i get field excluded in > "dgp" Login. Code execute successfully and fields get excluded. > > But if i use filedset, I get the error > > KeyError at /admin/newapp/profile/add/ > > "Key 'UserNext' not

KeyError at /admin/newapp/profile/add/ and Search Error --- Related Field got invalid lookup: icontains

2019-05-26 Thread Balaji Shetty
uot;)* *in* def get_form(self, request, obj=None, **kwargs): I do not use fieldset and comment the code, i get field excluded in "dgp" Login. Code execute successfully and fields get excluded. But if i use filedset, I get the error KeyError at /admin/newapp/profile/add/ &q

Re: python manage.py inspectdb > models.py crashing with KeyError: options['no-color']

2018-07-24 Thread Mikhailo Keda
ent call last): > File "custom_inspectdb.py", line 8, in > Command().execute(table_name_filter=lambda table_name: table_name in > tables, database='default') > File > "/venv/leg370/lib/python3.7/site-packages/django/core/management/base.py", >

python manage.py inspectdb > models.py crashing with KeyError: options['no-color']

2018-07-24 Thread dean raemaekers
in tables, database='default') File "/venv/leg370/lib/python3.7/site-packages/django/core/management/base.py", line 314, in execute if options['no_color']: KeyError: 'no_color' -- You received this message because you are subscribed to the Google Grou

Re: Django generated migration fails with KeyError for field that was removed from the model.

2018-04-19 Thread Jani Tiainen
18_2136...Traceback (most recent call > last): > > File "/Users/myuser/.virtualenvs/my_app/lib/python3.6/site- > packages/django/db/models/options.py", line 566, in get_field > > return self.fields_map[field_name] > > KeyError: 'amount_off' > >

Re: Django generated migration fails with KeyError for field that was removed from the model.

2018-04-19 Thread James Farris
; Running migrations: > > Applying my_app.0032_auto_20180418_2136...Traceback (most recent call last): > > File > "/Users/myuser/.virtualenvs/my_app/lib/python3.6/site-packages/django/db/models/options.py", > line 566, in get_field > > r

Django generated migration fails with KeyError for field that was removed from the model.

2018-04-18 Thread jackotonye
ent call last ): File "/Users/myuser/.virtualenvs/my_app/lib/python3.6/site-packages/django/db/models/options.py" , line 566, in get_field return self.fields_map[field_name] KeyError: 'amount_off' During handling of the above exception, another exception

Error rendering template ==> raise KeyError (key) KeyError: 'address_inline'

2017-08-09 Thread Elias Coutinho
Good afternoon people, I'm trying to render a template with django-material I am getting the error message in the template as below: And the complete traceback i

Django-cms KeyError at /en/cms_wizard/create/

2017-07-26 Thread IaMtheMcee
annotated 957. return self.render(context) File "C:\Users\Alexander\Desktop\v1\lib\site-packages\classytags\core.py" in render 153. return self.render_tag(context, **kwargs) File "C:\Users\Alexander\Desktop\v1\lib\site-packages\classytags\helpers.py" in

Re: Is this a bug? KeyError: 'is_popup' on mysite/admin, while logging level = DEBUG. Django 1.10.6.

2017-03-11 Thread np
Hi Thanks for your help Melvyn and Daniel.I was not familiar with this pattern. Good to hear that there is nothing actually wrong with the code. - np On Saturday, 11 March 2017 19:03:54 UTC+2, Melvyn Sopacua wrote: > > On Saturday 11 March 2017 07:55:58 np wrote: > > > > > being caught. Howev

Re: Is this a bug? KeyError: 'is_popup' on mysite/admin, while logging level = DEBUG. Django 1.10.6.

2017-03-11 Thread Melvyn Sopacua
On Saturday 11 March 2017 07:55:58 np wrote: > being caught. However, I do not understand why should I just *suppress > *Exceptions/KeyErrors in the templates? I did not understand *why* > this exception is raised. If there is no such variable as 'is_popup', > shoudn't I just provide one? Forgive

Re: Is this a bug? KeyError: 'is_popup' on mysite/admin, while logging level = DEBUG. Django 1.10.6.

2017-03-11 Thread np
o lines in the (index.html) base.html having 'is_popup'. Could you, or someone else please enlighten me a bit more. Is it possible to get rid of this Exception/KeyError, other than filtering out it from the log? - np On Saturday, 11 March 2017 15:10:21 UTC+2, Daniel Hepper wrote: &g

Re: Is this a bug? KeyError: 'is_popup' on mysite/admin, while logging level = DEBUG. Django 1.10.6.

2017-03-11 Thread Daniel Hepper
27;INFO', 'propagate': True, }, }, Hope that helps, Daniel https://consideratecode.com On Friday, March 10, 2017 at 11:03:19 PM UTC+1, np wrote: > > Hello, > > I am a django newbie, just making my first django site. I tried to log the > errors of my site, and fo

Is this a bug? KeyError: 'is_popup' on mysite/admin, while logging level = DEBUG. Django 1.10.6.

2017-03-10 Thread np
Hello, I am a django newbie, just making my first django site. I tried to log the errors of my site, and found out KeyError: 'is_popup' ... when accessing http://127.0.0.1:8000/admin/. I tried this also on fresh install, django 1.10.6, using python 3.5.2. I had nothing else instal

KeyError on Form using datePicker

2017-02-21 Thread Baktha Muralidharan
election on the calendar. I get KeyError on trying to read the field value. The Django debugs show that the POST data as shown here- POST VariableValue csrfmiddlewaretoken 'C4fvNKcVLaFpSCGHcukNhEIFkqLyCPqkgXCc64R8JNjQwq5EST3KCPRkMOZpAslT' perfDate '02/25/2017' Follow

Re: KeyError

2015-10-07 Thread Vijay Khemlani
od == "POST": > user_form = UserForm(request.POST) > if user_form.is_valid: > user = user_form.save() > return HttpResponseRedirect('/account/registered/') > else: > user_form = UserForm() > return render(request, 

KeyError

2015-10-07 Thread Benjamin Smith
orm(request.POST) if user_form.is_valid: user = user_form.save() return HttpResponseRedirect('/account/registered/') else: user_form = UserForm() return render(request, 'register_view.html', { 'user_form': user_form

KeyError

2015-10-07 Thread Benjamin Smith
orm(request.POST) if user_form.is_valid: user = user_form.save() return HttpResponseRedirect('/account/registered/') else: user_form = UserForm() return render(request, 'register_view.html', { 'user_form': user_form

Re: KeyError: 'default'

2015-04-07 Thread Mike Dewhirst
sn't line up properly in the email, the caret is positioned like this ... FROM "django_co... Â Â Â ^ The dev server runs and the software (unmigrated) works. I just cannot get my unit tests to run under 1.7. It is like the nightmare of finding yourself naked in T

Re: KeyError: 'default'

2015-04-07 Thread Flavia Missi
perly in the email, the caret is > positioned like this ... > > FROM "django_co... > ^ > > The dev server runs and the software (unmigrated) works. I just cannot > get my unit tests to run under 1.7. It is like the nightmare of finding > yourself naked in Times

Re: KeyError: 'default'

2015-04-06 Thread Mike Dewhirst
the email, the caret is positioned like this ... FROM "django_co... ^ The dev server runs and the software (unmigrated) works. I just cannot get my unit tests to run under 1.7. It is like the nightmare of finding yourself naked in Times Square! Mike Best regards, Pavel поÐ

Re: KeyError: 'default'

2015-04-06 Thread Pavel Kuchin
eone please explain what KeyError: 'default' means? > > This is the first time I have tried Django 1.7 and without doing any > migrations all I have done here is this ... > > (xxex3) C:\Users\mike\env\xxex3\ssds>copy > substance\fixtures\test_data.json substance\fixtur

KeyError: 'default'

2015-04-06 Thread Mike Dewhirst
Can someone please explain what KeyError: 'default' means? This is the first time I have tried Django 1.7 and without doing any migrations all I have done here is this ... (xxex3) C:\Users\mike\env\xxex3\ssds>copy substance\fixtures\test_data.json substance\fixtures\init

Re: (yet another) Custom templatetag raising KeyError when DEBUG=False

2014-12-27 Thread Alexandre Provencio
ages/django/template/debug.py", >> line 78, in render_node >> return node.render(context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/defaulttags.py", >> line 196, in render >> nodelist.ap

Re: (yet another) Custom templatetag raising KeyError when DEBUG=False

2014-12-26 Thread Collin Anderson
/python2.7/site-packages/django/template/defaulttags.py", > > > line 196, in render > nodelist.append(node.render(context)) > File > "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py", > > > line

Re: (yet another) Custom templatetag raising KeyError when DEBUG=False

2014-12-23 Thread Alexandre Provencio
etags/helper_tags.py", line 14, in change_lang path = context['request'].path File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/context.py", line 56, in __getitem__ raise KeyError(key) KeyError: 'request' [23/Dec/2014 09

Re: (yet another) Custom templatetag raising KeyError when DEBUG=False

2014-12-22 Thread Collin Anderson
made on stackoverflow > > http://stackoverflow.com/questions/27503581/yet-another-custom-templatetag-raising-keyerror-when-debug-false > > > I'm trying to use a custom templatetag (this one actually: > https://djangosnippets.org/snippets/2875/), on my project which works > f

(yet another) Custom templatetag raising KeyError when DEBUG=False

2014-12-20 Thread Alexandre Provencio
Hello all, this is a cross post i made on stackoverflow http://stackoverflow.com/questions/27503581/yet-another-custom-templatetag-raising-keyerror-when-debug-false I'm trying to use a custom templatetag (this one actually: https://djangosnippets.org/snippets/2875/), on my project which

Re: django & gunicorn: KeyError with active log-config setting

2014-11-17 Thread Collin Anderson
LOG # added this line with the \ before > > But when i start the server with supervisorctl i receive a "KeyError" for > the formatters. > Traceback (most recent call last): > File "/webapps/sonar3/tekkoSONAR/../bin/gunicorn", line 11, in > sys.exit(ru

django & gunicorn: KeyError with active log-config setting

2014-11-13 Thread Florian Auer
=$ERRLOG \ --access-logfile=$LOGFILE \ --log-config=$CONFLOG # added this line with the \ before But when i start the server with supervisorctl i receive a "KeyError" for the formatters. Traceback (most recent call last): File "/webapps/sonar3/tekkoSONAR/../bin/gunicorn", line

Re: Django 1.7, KeyError: u'manager' error

2014-10-17 Thread Sanjay Bhangar
> > > When I query like "modela_instance.modelb_set()", then I will get > KeyError: u'manager' as shown below: > AFAIK, you want something like "modela_instance.modelb_set.all()" - just modela_instance.modelb_set() is the manager instance that you call call meth

Django 1.7, KeyError: u'manager' error

2014-10-17 Thread Taenyon Kim
Example class ModelA(models.Model): fielda = models.CharField(max_length=10) class ModelB(models.Model): modela = models.ForeignKey(ModelA) fieldb = models.CharField(max_length=10) When I query like "modela_instance.modelb_set()", then I will get KeyError: u'ma

Re: KeyError: u"Unknown language code 'en-us'."

2014-01-21 Thread Geotribu
.render() File > "/home/users/avandecastee/osmq/lib/python2.6/site-packages/django/template/response.py", > > line 105, in render self.content = self.rendered_content > .. > > > File > "/home/users/avandecastee/osmq/lib/python2.6/site-packages/dj

Re: KeyError: u"Unknown language code 'en-us'."

2014-01-20 Thread Jonathan Pentecost
py", line 150, in get_language_info raise KeyError("Unknown language code %r." % lang_code) KeyError: u"Unknown language code 'en-us'." -->8 Could you tell me what I must change to avoid this messag

KeyError: u"Unknown language code 'en-us'."

2014-01-20 Thread Geotribu
...* * File "/home/users/avandecastee/osmq/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 150, in get_language_info raise KeyError("Unknown language code %r." % lang_code) KeyError: u"Unknown language code 'en-us'."* -

KeyError: Key 'slug' not found in Form

2013-09-28 Thread Roberto López López
kages/django/contrib/admin/helpers.py" in __init__ 35. } for field_name, dependencies in prepopulated_fields.items()] File "/home/roberto/.virtualenvs/ve_news/local/lib/python2.7/site-packages/django/forms/forms.py" in __getitem__ 111. raise KeyError(&#x

Local Flavor - PhoneNumberField (KeyError: Invalid)

2013-02-06 Thread Derrick Jackson
Hi all, I am working on implementing the US PhoneNumberField and currently as long as I pass in the expected phone number length (10 digits) the number is formatting numbers just as I expect. However, if I dont put enough numbers in the form field, I get a Key Error. I can't for the life of

Re: image KeyError

2012-04-21 Thread psychok7
ccessfully able to upload files(images) and store them in my > defined > > folder and the link in my mysql database. > > the error comes when i try to return the image with the HTTP RESPONSE > were > > i get a image keyError.. i am not sure wht i am doing w

Re: image KeyError

2012-04-21 Thread akaariai
ith the HTTP RESPONSE were > i get a image keyError.. i am not sure wht i am doing wrong.. > here is my code: > > def handle_uploaded_file(f,u): >     profile=u.get_profile() >     profile.avatar=f.name >     destination = open('images/users/'+f.name, 'wb+') >

Re: UnboundLocalError: local variable 'KeyError' referenced before assignment

2012-04-09 Thread Casey Greene
Great point Karen. It hadn't occurred to me that it could be a later occurrence that could lead to python thinking it was local. Later: except ValueError, KeyError After changing it to: except (ValueError, KeyError) the issue is resolved. Thanks so much! Casey On Mon, Apr 9, 2012 at 11:

Re: UnboundLocalError: local variable 'KeyError' referenced before assignment

2012-04-09 Thread Karen Tracey
; queries that lead to the error are ones where there is, in fact, a > KeyError.  I've actually manged to narrow it down to a pretty simple > test case though.  Within the view, I can do this (first few lines): > > def gene_view(request, slug=None, gene=None, org=None, template=None):

UnboundLocalError: local variable 'KeyError' referenced before assignment

2012-04-09 Thread Casey Greene
I have this very baffling error that I'm dealing with at the moment. I'm maintaining someone else's code and I'm getting this error for some queries with a try, except block in a view. It seems that the queries that lead to the error are ones where there is, in fact, a KeyE

Re: Very strange KeyError on 'PORT' in db/backends/mysql/base.py

2011-11-23 Thread Ivo Brodien
just another wild guess: in django/db/utils.py Line 84: for setting in ('NAME', 'USER', 'PASSWORD', 'HOST', 'PORT'): conn.setdefault(setting, ‘’) It looks like PORT is set to ‘’ instead of 3306 if missing. But still it should be in the dict. really strange, yes. -- You re

Re: Very strange KeyError on 'PORT' in db/backends/mysql/base.py

2011-11-23 Thread Ivo Brodien
> * Colleagues have been unable to reproduce this using very similar stacks > which could mean it's OS related to threading or something really low-level. > Sigh... maybe I did a wrong search, but I did grep -r '3306’ . inside the django directory and could not find a place where the defaul

Very strange KeyError on 'PORT' in db/backends/mysql/base.py

2011-11-23 Thread Peter Bengtsson
f._cursor(), self) File "/Users/peterbe/dev/MOZILLA/PTO/pto/vendor/src/django/django/db/backends/mysql/base.py", line 318, in _cursor if settings_dict['PORT']: KeyError: 'PORT' So just above line 318 in db/backends/mysql/base.py I put in this:: if 'PO

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
Problem solved: nose.tools.set_trace :) 2011/7/8 Daniel França > but my set_trace still freezes =/ If anyone have any idea what could be > that. > > I'm on a Mac OS 10.6 > > > 2011/7/8 Daniel França > >> yeah, thanks a lot, it's not 'BR' but I passed the ID of country and state >> and it worked

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
but my set_trace still freezes =/ If anyone have any idea what could be that. I'm on a Mac OS 10.6 2011/7/8 Daniel França > yeah, thanks a lot, it's not 'BR' but I passed the ID of country and state > and it worked. =) > > > On Fri, Jul 8, 2011 at 12:15 AM, Shawn Milochik wrote: > >> Could it b

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
yeah, thanks a lot, it's not 'BR' but I passed the ID of country and state and it worked. =) On Fri, Jul 8, 2011 at 12:15 AM, Shawn Milochik wrote: > Could it be because the test is passing 'Brasil' instead of 'BR'? I'm > assuming 'BR' is a valid choice and 'Brasil' is invalid. That's why you're

Re: KeyError in UnitTests

2011-07-07 Thread Shawn Milochik
Could it be because the test is passing 'Brasil' instead of 'BR'? I'm assuming 'BR' is a valid choice and 'Brasil' is invalid. That's why you're passing 'PR' instead of 'Paraná' in your data dictionary. If the field isn't a required field, then your form.is_valid() would be true, but there wou

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
e 268, in full_clean self._clean_form() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py", line 296, in _clean_form self.cleaned_data = self.clean() File "/Users/danielfranca/Workspace/gemin

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
I was thinking, if country isn't created, so this test should fail, but that's not what happen when I was using nose *country = Country.objects.get(pk=35)* *self.assertEqual( country.name, 'Brasil' )* * * On Thu, Jul 7, 2011 at 11:47 PM, Shawn Milochik wrote: > On 07/07/2011 10:

Re: KeyError in UnitTests

2011-07-07 Thread Shawn Milochik
On 07/07/2011 10:44 PM, Daniel França wrote: I changed the test runner to default and the error message is a lot more clear. I got a DatabaseError: no such table: cadastroav_country but this should be created by tests, right? I'm using South, maybe it's a problem? The problem could be with y

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
I changed the test runner to default and the error message is a lot more clear. I got a DatabaseError: no such table: cadastroav_country but this should be created by tests, right? I'm using South, maybe it's a problem? 2011/7/7 Daniel França > I did some tests > I put self.cleaned_data['X'] >

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
I did some tests I put self.cleaned_data['X'] where X I change to all the fields of my form, it in *def clean() *function and it seems only 2 fields aren't available, state and country, I believe that it's not a coincidence that both of them are foreign key(objects). I'm using a sqlite database an

Re: KeyError in UnitTests

2011-07-07 Thread Shawn Milochik
You should be able to use pdb and then examine variables in scope. Aren't you getting a pdb prompt? Are you redirecting your output? You can also using logging and put a bunch of debug statements in to narrow down where the problem lies. If you can make a bare-bones copy of your app that dupl

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
le. > > Furthermore, if country can be blank, you should use > > if cleaned_data.get('country', None): >do_stuff() > > to avoid that KeyError. > > Try that and if it doesn't work, post your complete form with > validation and the relevant view. > &g

Re: KeyError in UnitTests

2011-07-07 Thread Andre Terra
leaned_data.get('country', None): do_stuff() to avoid that KeyError. Try that and if it doesn't work, post your complete form with validation and the relevant view. Boa sorte! Abraço, André On 7/7/11, Daniel França wrote: > Hi, > I'm starting to use unit tests

Re: KeyError in UnitTests

2011-07-07 Thread Shawn Milochik
If you want to mess with 'country' then you write a clean_country(self) function. If you want to mess with 'document' you write a clean_document(self) function. If you want to do something with one and be sure the other is also available, you write a clean(self) function, which executes after

KeyError in UnitTests

2011-07-07 Thread Daniel França
5, in clean_document country = self.cleaned_data['country'] KeyError: 'country' this is the line (here's cleaning country, but whatever, there's no data at all) def clean_document(self): country = self.cleaned_data['country'] If I do the manual pro

Re: KeyError at /save/ 'tags'

2011-02-14 Thread Corden Naraga - Davao City, Philippines
Ya, that line causes the error - tag_names = form.cleaned_data['tags'].split() On Feb 15, 12:28 am, David De La Harpe Golden wrote: > On 14/02/11 13:58, corden wrote: > > >             tag_names = form.cleaned_data['tags'].split() > > ^^^ tags > > >     tag = forms.CharField(label=u'Tags', requir

Re: KeyError at /save/ 'tags'

2011-02-14 Thread David De La Harpe Golden
On 14/02/11 13:58, corden wrote: > tag_names = form.cleaned_data['tags'].split() ^^^ tags > tag = forms.CharField(label=u'Tags', required=False, ^^^ tag ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

KeyError at /save/ 'tags'

2011-02-14 Thread corden
Here's the code views.py -- def bookmark_save_page(request): if request.method == 'POST': form = BookmarkSaveForm(request.POST

Re: Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
t; (http://www.python.org/dev/peps/pep-0008/) > > On 13.02.2011, at 23:52, Bobby Roberts wrote: > > > when i try to delete one of the TractorRecord objects in this model, i > > get this message: > > > Caught KeyError while rendering: u'objects_name' &

Re: Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Ivo Brodien
l, i > get this message: > > Caught KeyError while rendering: u'objects_name' > > any idea what that means? > > Django 1.2.3 (mod_wsgi 3.2/Python 2.6) > > > > > # this holds possible dispositions for Tractoruees > class Disposition

Re: Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
i'm also using the grappelli skin for admin On Feb 13, 5:52 pm, Bobby Roberts wrote: > when i try to delete one of the TractorRecord objects in this model, i > get this message: > > Caught KeyError while rendering: u'objects_name' > > any idea what that mean

Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
when i try to delete one of the TractorRecord objects in this model, i get this message: Caught KeyError while rendering: u'objects_name' any idea what that means? Django 1.2.3 (mod_wsgi 3.2/Python 2.6) # this holds possible dispositions for Tractoruees class Disposition (mo

Re: django.test.TestCase in external tests files (KeyError: 'SUPPORTS_TRANSACTIONS'")

2010-07-01 Thread Karen Tracey
ngo\test\testcases.py", line 486, in _fixture_setup >if not connections_support_transactions(): > File "\django\django\test\testcases.py", line 475, in > connections_support_transactions >for conn in connections.all()) > File "\django\django\test\testc

django.test.TestCase in external tests files (KeyError: 'SUPPORTS_TRANSACTIONS'")

2010-07-01 Thread Jari Pennanen
e "\django\django\test\testcases.py", line 475, in connections_support_transactions for conn in connections.all()) File "\django\django\test\testcases.py", line 475, in for conn in connections.all()) KeyError: 'SUPPORTS_TRANSACTIONS' But if I use it normally in the "myap

Re: Problems witch Apache - KeyError at / - 'HOME'

2009-12-10 Thread Graham Dumpleton
> > > from datetime import datetime > > > > def main_page(request): > > >         output = ''' > > >                 > > >                         %s > > >                         > > >                            

Re: Problems witch Apache - KeyError at / - 'HOME'

2009-12-10 Thread edward9
port datetime > > > def main_page(request): > >         output = ''' > >                 > >                         %s > >                         > >                                 %s%s%s > >                         > >      

Re: Problems witch Apache - KeyError at / - 'HOME'

2009-12-10 Thread kid...@gmail.com
Not sure about your first error, but you are getting this second error because you forgot to put quotes around main_page in your urls.py On Dec 10, 12:28 am, edward9 wrote: > Yes. I restart Apache every configuration change. > > Error from text box: > Environment: > > Request Method: GET > Reques

Re: Problems witch Apache - KeyError at / - 'HOME'

2009-12-10 Thread Graham Dumpleton
  '1','a','b','c' >         ) >         return HttpResponse(output) > > urls.py > from django.conf.urls.defaults import * > from inet.views import * > > urlpatterns = patterns('', >         (r'^$',main_page), > )

Re: Problems witch Apache - KeyError at / - 'HOME'

2009-12-09 Thread edward9
Yes. I restart Apache every configuration change. Error from text box: Environment: Request Method: GET Request URL: http://127.0.0.1/ Django Version: 1.0.2 final Python Version: 2.5.4 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'dj

Re: Problems witch Apache - KeyError at / - 'HOME'

2009-12-09 Thread Karen Tracey
Did you restart Apache after making all your code changes? Please click the Switch to copy-and-paste view link and cut and paste the contents of the text box that will appear. The other version is not good for pasting into email. Karen -- You received this message because you are subscribed to

Problems witch Apache - KeyError at / - 'HOME'

2009-12-09 Thread edward9
%s %s%s%s ''' % ( '1','a','b','c' ) return HttpResponse(output) urls.py from django.conf.urls.defaults import * from inet.views impor

inlineformset_factory causing some KeyError whackiness.

2009-06-14 Thread Bartek
orm_base.save() # a simple modelform, this is. inline_formset = InlineFormset(request.POST, instance=new_base) if inline_formset.is_valid(): inline_formset.save() As soon as I hit the save(), I get a KeyError: None Traceback shows it's happening within the core saving function w

swingtime keyerror

2009-05-14 Thread gl330k
Hey all, I'm using an app called swingtime that I installed for event management. In the admin interface I'm trying to add events. It works great on my local development setup but when I've uploaded to the web server I'm unable to save events through the admin. It comes

running django as egg KeyError: 'startproject'

2009-05-07 Thread rich.al...@gmail.com
jango-1.1_beta_1-py2.5.egg/django/core/ management/__init__.py", line 126, in get_commands KeyError: 'startproject' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: KeyError on access to session variable

2009-03-10 Thread nivhab
et', False): > >             comLen=get_comment_count() > >             request.session['alert_count'] = comLen > >             request.session['data_was_set'] == True > > > and I am getting a KeyError exception on the 'if' line (This exception > > is supposed t

  1   2   >