Re: List Index out of Range

2021-10-03 Thread Lalit Suthar
Adding to above 2 answers index error may also occur when your time_frame_list or responsible_list does not have the same number of items as your input_list. You should try bnmng' s answer also > Which line in your code is triggering the error? you check it with simple print statements or using a

Re: List Index out of Range

2021-10-02 Thread Hedrick Godson's
Make sure you fill all the inputs with list and also make sure that you provide the correct input name to request.POST.getlist() method otherwise it will returns empty list which will raise IndexError On Sun, 3 Oct 2021, 03:13 bnmng, wrote: > Which line in your code is triggering the error? > >

Re: List Index out of Range

2021-10-02 Thread bnmng
Which line in your code is triggering the error? On Saturday, October 2, 2021 at 11:07:13 AM UTC-4 eugenet...@gmail.com wrote: > Good day all, > > I need assistance. Am trying to save data from the below form but I am > getting *list out of range* error > can someone help me to write a success

List Index out of Range

2021-10-02 Thread Eugene TUYIZERE
Good day all, I need assistance. Am trying to save data from the below form but I am getting *list out of range* error can someone help me to write a successful save function? here is the code I am using: def submit_work(request): if request.method != "POST": return HttpResponse("Method Not Al

Re: Django IndexError: list index out of range

2013-08-24 Thread Oleg Gorjajnov
Yes, this is typo. But I don't see there no edit button суббота, 24 августа 2013 г., 20:52:45 UTC+4 пользователь WongoBongo написал: > > Can you change the name of this file from > > newweb/polls/__init.py__ > > to > > newweb/polls/__init__.py > > That file name is not right. > > K > > > > On Satu

Re: Django IndexError: list index out of range

2013-08-24 Thread Kelvin Wong
Can you change the name of this file from newweb/polls/__init.py__ to newweb/polls/__init__.py That file name is not right. K On Saturday, August 24, 2013 8:02:38 AM UTC-7, Oleg Gorjajnov wrote: > > I'm new to Django. > > > newweb/ > manage.py > newweb/ > __init__.p

Re: Django IndexError: list index out of range

2013-08-24 Thread Oleg Gorjajnov
No, I have no problems with manage.py runserver or syncdb. Just now tried build this code in PyCharm and got the same error суббота, 24 августа 2013 г., 19:42:04 UTC+4 пользователь tom написал: > > > On 24 Aug 2013, at 16:02, Oleg Gorjajnov > > wrote: > > And this is *not my case*. > > So what'

Re: Django IndexError: list index out of range

2013-08-24 Thread Thomas Scrace
On 24 Aug 2013, at 16:02, Oleg Gorjajnov wrote: > And this is not my case. > > So what's wrong with that? It must work well without meta classes. > Do you get any problems when you do manage.py runserver or syncdb? I think your problem stems from trying to build within Sublime Text. -- Yo

Django IndexError: list index out of range

2013-08-24 Thread Oleg Gorjajnov
ojects\newweb\polls\models.py", line 3, in class Poll(models.Model): File "C:\python27\lib\site-packages\django\db\models\base.py", line 93, in __new__ kwargs = {"app_label": model_module.__name__.split('.')[-2]} IndexError: list index out of range

Re: debug.py list index out of range

2010-07-15 Thread shwetanka
y", line > > 109, in get_traceback_html > >    frames = self.get_traceback_frames() > > >  File "C:\Python26\lib\site-packages\django\views\debug.py", line > > 228, in get_traceback_frames > >    pre_context_lineno, pre_context, context_line, post_context =

Re: debug.py list index out of range

2010-07-15 Thread shwetanka
ite-packages\django\views\debug.py", line > > 109, in get_traceback_html > >    frames = self.get_traceback_frames() > > >  File "C:\Python26\lib\site-packages\django\views\debug.py", line > > 228, in get_traceback_frames > >    pre_context_lineno, p

Re: debug.py list index out of range

2010-07-15 Thread Tom Evans
ack_frames() > >  File "C:\Python26\lib\site-packages\django\views\debug.py", line > 228, in get_traceback_frames >    pre_context_lineno, pre_context, context_line, post_context = > self._get_lines_from_file(filename, lineno, 7, loader, module_name) > >  File "C

debug.py list index out of range

2010-07-15 Thread shwetanka
ines_from_file(filename, lineno, 7, loader, module_name) File "C:\Python26\lib\site-packages\django\views\debug.py", line 209, in _get_lines_from_file context_line = source[lineno].strip('\n') IndexError: list index out of range -- You received this message be

IndexError: list index out of range

2009-09-21 Thread Chris McComas
I am trying to write to CSV, I was able to do so before, not sure what the problem is... When my query returns results, I get this error http://dpaste.com/96399/ Here's my view http://dpaste.com/96398/ If the query is empty it opens the CSV with only the header row... What am I doing wrong? --

Re: IndexError (list index out of range) in admin when updating a regex char primary key

2009-03-29 Thread TeenSpirit83
alue to 'Second', a queryset of AssociatedThing objects that point to > 'Second' returns 0 results.  The admin tries to create a formset using a > queryset that specifies the new pk value, but the objects in that queryset > don't match up to the POST data in the

Re: IndexError (list index out of range) in admin when updating a regex char primary key

2009-03-26 Thread Karen Tracey
ing a queryset that specifies the new pk value, but the objects in that queryset don't match up to the POST data in the request. This mismatch results in the the formset creation code causing list index out of range when trying to match up the POST data with a non-existent matching objects in

IndexError (list index out of range) in admin when updating a regex char primary key

2009-03-26 Thread TeenSpirit83
t_form (i, **kwargs) File "C:\Django-1.0.2\django\forms\models.py" in _construct_form 356. kwargs['instance'] = self.get_queryset()[i] File "C:\Django-1.0.2\django\db\models\query.py" in __getitem__ 221. return self._result_cache[k] Ex

Re: Model fails in shell but not in runserver - IndexError: list index out of range

2009-01-26 Thread phoebebright
ry(models.Model): > >  File "/usr/lib/python2.4/site-packages/django/db/models/base.py", > > line 51, in __new__ > >    kwargs = {"app_label": model_module.__name__.split('.')[-2]} > > IndexError: list index out of range > > Normally I

Re: Model fails in shell but not in runserver - IndexError: list index out of range

2009-01-26 Thread Karen Tracey
uot;, line 1, in ? > File "/home/django/towns/models.py", line 8, in ? >class Category(models.Model): > File "/usr/lib/python2.4/site-packages/django/db/models/base.py", > line 51, in __new__ > kwargs = {"app_label": model_module.__name__.split

Model fails in shell but not in runserver - IndexError: list index out of range

2009-01-26 Thread phoebebright
y(models.Model): File "/usr/lib/python2.4/site-packages/django/db/models/base.py", line 51, in __new__ kwargs = {"app_label": model_module.__name__.split('.')[-2]} IndexError: list index out of range I can try and import any class from the model and I get the

Re: template IndexError (list index out of range)

2008-04-12 Thread Jonathan Lukens
apparently there > are none. This would seem to be coming from the {% if baby.photo %} line in > your template. Your code needs to handle the case where > self.photo_set.all() is empty. > > Karen > > > File "/usr/lib/python2.5/site-packages/django/db/models/query.py&q

Re: template IndexError (list index out of range)

2008-04-12 Thread Karen Tracey
late. Your code needs to handle the case where self.photo_set.all() is empty. Karen > File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in > __getitem__ > 157. return list(self._clone(_offset=k, > _limit=1))[0] > > Exception Type:

template IndexError (list index out of range)

2008-04-12 Thread Jonathan Lukens
an/workspace/datababy/src/datababy/child/models.py" in photo 96. return self.photo_set.all()[0] File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in __getitem__ 157. return list(self._clone(_offset=k, _limit=1))[0] Excepti

Re: Getting Error - "Error while importing URLconf 'blogango.urls': list index out of range"

2007-12-22 Thread Malcolm Tredinnick
On Sat, 2007-12-22 at 00:53 -0800, shabda wrote: > Ok I found the error, but I still cant understand why this is > happening. What I did was that, in the blogango.urls, I have a line > like > > import feeds > > THe feeds.py is, > > class main_feed (Feed): > blog = Blog.objects.all()[0] Th

Re: Getting Error - "Error while importing URLconf 'blogango.urls': list index out of range"

2007-12-22 Thread shabda
sed? On Dec 22, 1:26 pm, shabda <[EMAIL PROTECTED]> wrote: > Getting this error, "Error while importing URLconf 'blogango.urls': > list index out of range". The exception stack does not give any cles > to what might be wrong. The exception stack is, > Tra

Getting Error - "Error while importing URLconf 'blogango.urls': list index out of range"

2007-12-22 Thread shabda
Getting this error, "Error while importing URLconf 'blogango.urls': list index out of range". The exception stack does not give any cles to what might be wrong. The exception stack is, Traceback: File "C:\Python24\lib\site-packages\django\core\handlers\base

Re: Error: list index out of range

2007-12-14 Thread James Bennett
On Dec 14, 2007 8:06 AM, Julien <[EMAIL PROTECTED]> wrote: > Thanks James for the tips. However I think that my app is not generic > enough to be on the Python path. Generic has nothing to do with it; unless you have extremely compelling reasons for tying the app to the project, simply don't do i

Re: Error: list index out of range

2007-12-14 Thread Julien
Thanks James for the tips. However I think that my app is not generic enough to be on the Python path. I agree that one shouldn't do "myproject.myapp.models", and in fact, I don't. My problem is that the custom tags are in the templatetags directory. The structure is like this: myapp |tem

Re: Error: list index out of range

2007-12-13 Thread James Bennett
On Dec 13, 2007 10:46 PM, Julien <[EMAIL PROTECTED]> wrote: > But it still doesn't work. To make it work I have to do the whole: > from myproject.myapp.models import Bla > > Not very reusable approach... While it works well for the tutorial, where keeping all the code in one place reduces the num

Re: Error: list index out of range

2007-12-13 Thread Julien
Hi, I ran my code on another server and the error message was more explicit. The problem was in fact that in a templatetags file I was referring to the parent's models package, and it didn't work... Is it possible to import a model from a parent package? Apparently in Python 2.5 you can do: fro

Re: Error: list index out of range

2007-12-13 Thread l5x
Can you give us "class RegistrationProfile" from C:\Python25\Lib\site- packages\registration\models.py ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: Error: list index out of range

2007-12-13 Thread Julien
This is in the application from http://code.google.com/p/django-registration/ The code is: class RegistrationProfile(models.Model): """ A simple profile which stores an activation key for use during user account registration. Generally, you will not want to interact directly wit

Re: Error: list index out of range

2007-12-13 Thread Julien
quot; in 5. from models import Project File "C:\Python25\Lib\site-packages\registration\models.py" in 169. class RegistrationProfile(models.Model): File "C:\Python25\Lib\site-packages\django\db\models\base.py" in __new__ 53. new_class._meta.app_label = model_modu

Re: Error: list index out of range

2007-12-13 Thread l5x
Traceback? Template variables? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EM

Error: list index out of range

2007-12-13 Thread Julien
Hi there, I have rearranged the structure of my project and made some minor changes in the code, and suddenly nothing works at all. Every page of the site fails and give the error "list index out of range". In fact, the error is generated each time I do a return render_t