Re: if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object

2024-06-05 Thread Sanjay Sikdar
RAGE_BUCKET_NAME, "location": 'static' }, }, } On Monday, December 14, 2020 at 2:10:32 PM UTC+5:30 KUMBHAGIRI SIVAKRISHNA wrote: > ile > "/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py&

Re: TypeError at /register User() got unexpected keyword arguments: 'name1', 'name2', 'country'

2023-03-30 Thread Fathimanesmi As
django user has the following fields model : - username - password - email

Re: TypeError at /register User() got unexpected keyword arguments: 'name1', 'name2', 'country'

2023-03-30 Thread Alex Sonar
Hi Ebenezer, Could I ask you to show the content of the model file, please? On Thursday, March 30, 2023 at 5:21:06 AM UTC+3 Ebenezer Otchere wrote: > I am trying to collect user information and save in my database but i keep > getting this error > and i dont know the way around it so help me

Re: Uncaught TypeError: styled_default is not a function

2023-03-15 Thread David Nugent
. Regards, Davd "praveen raj" writes: Hi all, i'm trying to django-react application with postgres db but its giving me the following error: Uncaught TypeError: styled_default is not a function at Popper.js:11:20 Capture1.PNG here i'm using mui : Capture2.PNG -- Yo

Uncaught TypeError: styled_default is not a function

2023-03-15 Thread praveen raj
Hi all, i'm trying to django-react application with postgres db but its giving me the following error: Uncaught TypeError: styled_default is not a function at Popper.js:11:20 [image: Capture1.PNG] here i'm using mui : [image: Capture2.PNG] -- You received this message because you

Uncaught TypeError: data.find is not a function

2022-07-10 Thread Kiran Chavan
I am trying to convert the model instances into a JSON object and then according to the value selected in the dropdown menu, I want to assign its amount to the `line_one_unit_price` text field in the form. Javascript code: {{ data|json_script:"hello-data" }} const data =

Re: TypeError: Cannot call delete() after .distinct() in the Admin

2022-04-07 Thread Mike Dewhirst
Sorry - just found it in the docs M On 7/04/2022 5:05 pm, Mike Dewhirst wrote: How can I remove the 'Delete' option from Django Admin actions? Many thanks Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public

TypeError: Cannot call delete() after .distinct() in the Admin

2022-04-07 Thread Mike Dewhirst
How can I remove the 'Delete' option from Django Admin actions? Many thanks Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Just ask

Re: TypeError: fromisoformat: argument must be str

2022-02-12 Thread Sammeeey
Same solution for me. If you follow the link to the thread in the Django forum <https://forum.djangoproject.com/t/typeerror-fromisoformat-argument-must-be-str/12034>, you'll find a detailed discussion there.✌ gautam...@gmail.com schrieb am Dienstag, 8. Februar 2022 um 11:20:10 UTC+1:

Re: TypeError: fromisoformat: argument must be str

2022-02-08 Thread Gautam Ankul
Same issue in mine project but when database name change and delete all migration file then it is resolve On Tue, 8 Feb, 2022, 3:45 PM Sammeeey, wrote: > I have posted my issue to the Django Forum. > Please find it in the respective thread > <https://forum.djangoproject.com

TypeError: fromisoformat: argument must be str

2022-02-08 Thread Sammeeey
I have posted my issue to the Django Forum. Please find it in the respective thread <https://forum.djangoproject.com/t/typeerror-fromisoformat-argument-must-be-str/12034> -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: TypeError: 'module' object is not iterable - django 4

2022-02-01 Thread muwaga micheal
Issue was sorted.. Here is the link. python 3.x - TypeError: 'module' object is not iterable in django 4 - Stack Overflow <https://stackoverflow.com/questions/70924854/typeerror-module-object-is-not-iterable-in-django-4> On Monday, January 31, 2022 at 11:53:03 AM UTC+3 muwaga micheal

TypeError: 'module' object is not iterable - django 4

2022-01-31 Thread muwaga micheal
Drives\MDigital\CIT-Letures\python10_env\lib\site-packages\django\urls\resolvers.py", line 634, in url_patterns iter(patterns) TypeError: 'module' object is not iterable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\

Re: Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-15 Thread Kyle Paterson
Sencer HAMARAT >>> >>> >>> >>> On Wed, Dec 8, 2021 at 4:59 PM Kyle Paterson >>> wrote: >>> >>>> Started a new project after not using Django for roughly two years, >>>> works fine when running as a development se

Re: Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-15 Thread Kyle Paterson
ty name. >> >> Regards, >> Sencer HAMARAT >> >> >> >> On Wed, Dec 8, 2021 at 4:59 PM Kyle Paterson >> wrote: >> >>> Started a new project after not using Django for roughly two years, >>> works fine when running as a developmen

Re: Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-09 Thread Jason
; > Regards, > Sencer HAMARAT > > > > On Wed, Dec 8, 2021 at 4:59 PM Kyle Paterson wrote: > >> Started a new project after not using Django for roughly two years, works >> fine when running as a development server but throws TypeError: >> SimpleLazyObject clas

Re: Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-08 Thread Sencer Hamarat
ing Django for roughly two years, works > fine when running as a development server but throws TypeError: > SimpleLazyObject class: property object not callable. > > From apache error log: > [Wed Dec 08 10:11:53.023239 2021] [wsgi:error] [pid 10704:tid > 140343150348032] [remote 127.0

Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-08 Thread Kyle Paterson
Started a new project after not using Django for roughly two years, works fine when running as a development server but throws TypeError: SimpleLazyObject class: property object not callable. >From apache error log: [Wed Dec 08 10:11:53.023239 2021] [wsgi:error] [pid 10704:tid 140343150348

Re: TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

2021-11-20 Thread Peter of the Norse
CommentForm inherits from both ModelForm and “forms”. I don’t know what “forms” is, but PEP-8 says all classes should be capitalized. If forms is a base class that has already defined Meta, then you need to have CommentForm’s extend it. So change the line to class Meta(forms.Meta): > On Oct

Re: TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

2021-11-02 Thread patel dhruvish
Close with Square bracket [ ' ' , ' '] On Fri, Oct 29, 2021, 19:36 Sabbir Hasan Munna wrote: > > [image: Annotation 2021-10-29 081743.png] > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop

Re: TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

2021-10-30 Thread waqar khan
close round bracket *class Meta:* On Fri, Oct 29, 2021 at 7:36 PM Sabbir Hasan Munna < sabbirhasan2...@gmail.com> wrote: > > [image: Annotation 2021-10-29 081743.png] > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

2021-10-29 Thread Sabbir Hasan Munna
[image: Annotation 2021-10-29 081743.png] -- 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

Re: TypeError __init__() takes 1 positional argument but 2 were given

2021-10-19 Thread Lalit Suthar
try changing this def get_context_data(self, *args, **kwargs): context = super(registro, self).get_context_data(*args, **kwargs) to this def get_context_data(self, **kwargs): context = super(registro, self).get_context_data(**kwargs) refer:

TypeError __init__() takes 1 positional argument but 2 were given

2021-10-18 Thread Jose Cabrera
hello everyone, please help me with this error that is generated in the views.py, in class registro(CreateView): Thank you form.py class RegistrationForm(forms.ModelForm): password = forms.CharField(label='Password', widget=forms.PasswordInput) class Meta: model = UserProfile

TypeError: dict object is not callable (inside Thread function)

2021-10-17 Thread Hima Bindu chowdary
Hi guys, I am getting an error in a program which is using threading to perform functions simultaneously, this process is a job which is run once per hour, The data that comes in is from a view in sql. The function that we call in target arg returns a dictionary and says "dict object is

Re: TypeError: 'str' object is not callable

2021-09-13 Thread Salima Begum
Hi, In my project for success confirmation messages I am using the Messages framework from Django. Here I am always getting errors in deployment server. https://docs.djangoproject.com/en/3.2/ref/contrib/messages/ After deploying site.when i am continuously testing site. After some time I am

Re: TypeError: 'str' object is not callable

2021-09-01 Thread Lalit Suthar
cool :) On Tue, 31 Aug 2021 at 11:27, Salima Begum wrote: > Hi all, > Actually this error is prompting because in my deployment site I am using > django version 3.2. In this version they have some issue with messages so, > I referred to this document and I fixed it by adding one line in the >

Re: TypeError: 'str' object is not callable

2021-08-30 Thread Salima Begum
Hi all, Actually this error is prompting because in my deployment site I am using django version 3.2. In this version they have some issue with messages so, I referred to this document and I fixed it by adding one line in the settings.py file.

Re: TypeError: 'str' object is not callable

2021-08-30 Thread Lalit Suthar
go like this messages.add_message(request, messages.WARNING, "failure message") return HttpResponse / render On Tue, 31 Aug 2021 at 10:32, Salima Begum wrote: > Hi, Thank you for your response. > I have defined as below I have mentioned snippet in all functionalities > i am getting error in

Re: TypeError: 'str' object is not callable

2021-08-30 Thread Salima Begum
Hi, Thank you for your response. I have defined as below I have mentioned snippet in all functionalities i am getting error in every functionality " 'str' object is not callable ".Please help me to fix this issue. ``` messages.success(request, """Your Ad is successfully posted.""") ```

Re: TypeError: 'str' object is not callable

2021-08-30 Thread Salima Begum
Hi Thomas, The way I defined how i have written code for confirmation message ``` messages.success(request, """Your Ad is successfully posted.""") ``` Thank you ~Salima On Tue, Aug 31, 2021 at 9:31 AM Thomas Lockhart wrote: > Just guessing that you need to write > > messages.success =

Re: TypeError: 'str' object is not callable

2021-08-30 Thread Jacob Greene
You need to pass the request object as the first argument. https://docs.djangoproject.com/en/3.2/ref/contrib/messages/ On Mon, Aug 30, 2021, 11:01 PM Thomas Lockhart wrote: > Just guessing that you need to write > > messages.success = “Your ad is successfully posted” > > But without more

Re: TypeError: 'str' object is not callable

2021-08-30 Thread Thomas Lockhart
Just guessing that you need to write messages.success = “Your ad is successfully posted” But without more information from you that is only a guess. How is messages.success defined? - Tom > On Aug 30, 2021, at 8:57 PM, Salima Begum > wrote: > > Hi all, > In my project for each

TypeError: 'str' object is not callable

2021-08-30 Thread Salima Begum
Hi all, In my project for each functionality I have written code for confirmation messages. For example ``` messages.success("Your ad is successfully posted") ``` Every functionality is breaking because of confirmation messages after deployment. How to fix it? Can anyone help me? Thank you

Re: Admin TypeError - Cannot call delete() after .distinct()

2021-07-02 Thread Mike Dewhirst
Just looked at that ticket and it seems probable that is what is happening.I'll be patient. Thanks for thatM--(Unsigned mail from my phone) Original message From: Jason Date: 2/7/21 22:30 (GMT+10:00) To: Django users Subject: Re: Admin TypeError - Cannot call delete() after

Re: Admin TypeError - Cannot call delete() after .distinct()

2021-07-02 Thread Mike Dewhirst
Should have mentioned - I'm running 3.2.4M--(Unsigned mail from my phone) Original message From: Jason Date: 2/7/21 22:30 (GMT+10:00) To: Django users Subject: Re: Admin TypeError - Cannot call delete() after .distinct() https://code.djangoproject.com/ticket/32682 might

Re: Admin TypeError - Cannot call delete() after .distinct()

2021-07-02 Thread Sebastian Jung
in\actions.py", > > line 45, in delete_selected > modeladmin.delete_queryset(request, queryset) >File > "D:\Users\mike\envs\xxai\lib\site-packages\django\contrib\admin\options.py", > > line 1109, in delete_queryset > queryset.delete() >

Re: Admin TypeError - Cannot call delete() after .distinct()

2021-07-02 Thread Jason
in delete_selected > modeladmin.delete_queryset(request, queryset) > File > "D:\Users\mike\envs\xxai\lib\site-packages\django\contrib\admin\options.py", > > line 1109, in delete_queryset > queryset.delete() > File > "D:\Users\mike\envs\xxai\lib\si

Admin TypeError - Cannot call delete() after .distinct()

2021-07-02 Thread Mike Dewhirst
es\django\contrib\admin\actions.py", line 45, in delete_selected     modeladmin.delete_queryset(request, queryset)   File "D:\Users\mike\envs\xxai\lib\site-packages\django\contrib\admin\options.py", line 1109, in delete_queryset     queryset.delete()   File "D:\Users\mike\

Re: TypeError: Password must be a string or bytes, got BoundField

2021-06-04 Thread DJANGO DEVELOPER
have you converted your password into hashed? if not then do it by using set_password. On Fri, Jun 4, 2021 at 10:29 PM Kasper Laudrup wrote: > > https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd > > -- > You received this message because you are subscribed to the

Re: TypeError: Password must be a string or bytes, got BoundField

2021-06-04 Thread Kasper Laudrup
https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd -- 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

TypeError: Password must be a string or bytes, got BoundField

2021-06-04 Thread pikasu pikasu
*models.py* class recruiterLogin(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) mobile = models.CharField(max_length=15,null=True) image = models.FileField(null=True) gender = models.CharField(max_length=10) type = models.CharField(max_length=15) def __str__(self): return

TypeError at /

2021-04-08 Thread Izzuan Ariffin
Background: I'm trying to test a localhost login of django-microsoft-auth 2.4.0. I've read and followed the documentation: *Usage <https://django-microsoft-auth.readthedocs.io/en/latest/usage.html#quickstart>* I've configured it step by step and it returns an error. TypeError: 'No

TypeError: filename must be a str or bytes object, or a file

2021-03-16 Thread Mira
line 174, in __init__ with gzip.open(password_list_path, 'rt', encoding='utf-8') as f: File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/gzip.py", line 57, in open raise TypeError("filename must be a str or bytes object, or a file") TypeError: filenam

Re: if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object

2020-12-14 Thread Kasper Laudrup
On 14/12/2020 09.38, KUMBHAGIRI SIVAKRISHNA wrote: ile "/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py", line 200, in validate_bucket_name     if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected strin

if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object

2020-12-14 Thread KUMBHAGIRI SIVAKRISHNA
ile "/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py", line 200, in validate_bucket_name if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object Please help me to solve th

Re: TypeError: object() takes No Parameters

2020-09-17 Thread coolguy
Thursday, September 17, 2020 at 4:00:08 PM UTC-4 pcar...@gmail.com wrote: > The actual trace coolguy is > > TypeError at /functions/ClassMonthlyCost/object() takes no > parametersRequest > Method: GETRequest > URL: http://98.8.61.133:8080/functions/ClassMonthlyCost/Django > V

Re: TypeError: object() takes No Parameters

2020-09-17 Thread Patrick Carra
get_response [Thu Sep 17 23:07:26.871073 2020] [wsgi:error] [pid 39120] [remote 142.136.2.27:45290] response = wrapped_callback(request, *callback_args, **callback_kwargs) [Thu Sep 17 23:07:26.871079 2020] [wsgi:error] [pid 39120] [remote 142.136.2.27:45290] TypeError: object() takes no param

Re: TypeError: object() takes No Parameters

2020-09-17 Thread Patrick Carra
The actual trace coolguy is TypeError at /functions/ClassMonthlyCost/object() takes no parametersRequest Method: GETRequest URL: http://98.8.61.133:8080/functions/ClassMonthlyCost/Django Version: 2.2.4Exception Type: TypeErrorException Value: object() takes no parametersException Location

Re: TypeError: object() takes No Parameters

2020-09-17 Thread coolguy
pass to a my views Class. I am getting an error when I do > this TypeError: Object() takes no parameters. I have included a link to > the django tables 2 doc and my code below: > > #views.py > from django_tables2.views import SingleTableMixin > from django_tables2.ex

TypeError: object() takes No Parameters

2020-09-17 Thread Patrick Carra
(a list of dicts) and then to instantiate a table in tables.py and pass to a my views Class. I am getting an error when I do this TypeError: Object() takes no parameters. I have included a link to the django tables 2 doc and my code below: #views.py from django_tables2.views import

Re: Proxy User and AUTH_USER_MODEL: TypeError: MyUser cannot proxy the swapped model 'myapp.MyUser'.

2020-06-22 Thread Eugene Kulak
ckage, level) >>> File "", line 978, in _gcd_import >>> File "", line 961, in _find_and_load >>> File "", line 950, in _find_and_load_unlocked >>> File "", line 655, in _load_unlocked >>> File ""

Re: TypeError: __init__() got an unexpected keyword argument 'Null'

2020-05-21 Thread Samsul Islam
null=True On Thursday, May 21, 2020 at 6:27:10 AM UTC+6, jlgimeno71 wrote: > > Similar to keys in a dictionary, keyword argument names are case > sensitive. Try to pass in the lowercase version 'null': > > Raison_Non_Delivery_cd = models.ForeignKey(Raison, > on_delete=models.CASCADE,

Re: TypeError: __init__() got an unexpected keyword argument 'Null'

2020-05-20 Thread Jorge Gimeno
Similar to keys in a dictionary, keyword argument names are case sensitive. Try to pass in the lowercase version 'null': Raison_Non_Delivery_cd = models.ForeignKey(Raison, on_delete=models.CASCADE, related_name='raisonNonDelivery', null=True) -Jorge On Wed, May 20, 2020 at 5:05 PM hajar

TypeError: __init__() got an unexpected keyword argument 'Null'

2020-05-20 Thread hajar
hello django users , I hope u r doing well ! why can't I use Null in this case of foreign key , I hope you can see the picture below that's my class and the error [image: err.png] -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: TypeError: resolve() got an unexpected keyword argument 'strict' in Django

2020-05-14 Thread uday
bhi/PycharmProjects/SearchProject/venv/lib/python3.6/site-packages/django/utils/autoreload.py", > > line 105, in iter_all_python_module_files > return iter_modules_and_files(modules, frozenset(_error_files)) > File > "/Users/Abhi/PycharmProjects/SearchProject/venv/lib/py

Re: TypeError: resolve() got an unexpected keyword argument 'strict' in Django

2020-04-12 Thread Ernest Thuku
python_module_files() > File "/Users/Abhi/PycharmProjects/SearchProject/venv/lib/ > python3.6/site-packages/django/utils/autoreload.py", line 105, in > iter_all_python_module_files > return iter_modules_and_files(modules, frozenset(_error_files)) > File "

TypeError: resolve() got an unexpected keyword argument 'strict' in Django

2020-04-12 Thread Abhishek Pandey
/autoreload.py", line 105, in iter_all_python_module_files return iter_modules_and_files(modules, frozenset(_error_files)) File "/Users/Abhi/PycharmProjects/SearchProject/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 141, in iter_modules_and_files

Re: JSONField filter fails with TypeError: can only concatenate tuple (not "list") to tuple

2019-11-12 Thread John-Paul Navarro
Django 2.2.7 fixed the problem. Thanks! On Friday, November 1, 2019 at 4:59:11 PM UTC-5, Raffaele Salmaso wrote: > > On Fri, Nov 1, 2019 at 10:38 PM John-Paul Navarro > wrote: > >> The following fails with Django 2.2.6 but works with Django 1.11.x. >> >

Re: JSONField filter fails with TypeError: can only concatenate tuple (not "list") to tuple

2019-11-01 Thread Raffaele Salmaso
On Fri, Nov 1, 2019 at 10:38 PM John-Paul Navarro wrote: > The following fails with Django 2.2.6 but works with Django 1.11.x. > https://code.djangoproject.com/ticket/30826 -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso | https://github.com/rsalmaso -- You

JSONField filter fails with TypeError: can only concatenate tuple (not "list") to tuple

2019-11-01 Thread John-Paul Navarro
triped = xdinfo_gridftpn_Serializer(objects, many=True) len(serializernonstriped.data) Failes like this: (Pdb) n > /soft/python-pipenv/python-201910-zz_fwp56/lib/python3.7/site-packages/django/contrib/postgres/lookups.py(11)as_sql() -> params = lhs_params + rhs_params (Pdb) n TypeErr

Re: TypeError: api_view() takes from 0 to 1 positional arguments but 2 were given

2019-10-24 Thread chiyabgs
Oct 24, 2019 at 5:01 PM chiyabgs > > wrote: > >> Project was working fine on macos. Now trying to host on linux. >> Getting this error on makemigrations / createsuperuser / runserver . >> >> @api_view(['GET'], ['POST']) >> TypeError: api_view() takes

Re: TypeError: api_view() takes from 0 to 1 positional arguments but 2 were given

2019-10-24 Thread Jorge Gimeno
ect was working fine on macos. Now trying to host on linux. > Getting this error on makemigrations / createsuperuser / runserver . > > @api_view(['GET'], ['POST']) > TypeError: api_view() takes from 0 to 1 positional arguments but 2 were > given ( full trace below): > > Oth

TypeError: api_view() takes from 0 to 1 positional arguments but 2 were given

2019-10-24 Thread chiyabgs
Project was working fine on macos. Now trying to host on linux. Getting this error on makemigrations / createsuperuser / runserver . @api_view(['GET'], ['POST']) TypeError: api_view() takes from 0 to 1 positional arguments but 2 were given ( full trace below): Other projects with similar

[Django][ Pandas] TypeError: crosstab() missing 1 required positional argument: 'columns'

2019-09-22 Thread Dilipkumar Noone
executing below statement, cross tab i am getting *TypeError: crosstab() missing 1 required positional argument: 'columns'* === *gsp_pivoted_table= pd.crosstab([df.Category,df.LGSIDomainOwners],ma

Re: TypeError: expected string or bytes-like object

2019-08-30 Thread Suraj Thapa FC
Code pls On Fri, 30 Aug, 2019, 6:06 PM Soumen Khatua, wrote: > Hi Folks, > > After do some modification in models.py like I remove some column and add > some column in my models,now I'm getting this error: > > *TypeError: expected string or bytes-like object* > > &g

TypeError: expected string or bytes-like object

2019-08-30 Thread Soumen Khatua
Hi Folks, After do some modification in models.py like I remove some column and add some column in my models,now I'm getting this error: *TypeError: expected string or bytes-like object* Please tell me how can i solve this problem? Thank You Regards, Soumen -- You received this message

Re: TypeError: missing 1 required positional argument (word counter app)

2019-07-10 Thread drone4four
For what it is worth, here is some of the documentation I’ve been working with. I’ve referred to official Django docs for: - File uploads: https://docs.djangoproject.com/en/2.2/topics/http/file-uploads/ - Form handling with class-based views:

TypeError: missing 1 required positional argument (word counter app)

2019-07-10 Thread drone4four
I’ve got a Python script which counts and prints the number of words in a text file. The script runs beautifully. It takes a public domain book (a text file such as Alice and Wonderland) which then counts the top 10 most used words (but which also filters out stopwords). See here for some of

Re: TypeError

2019-05-22 Thread Bob Gailer
On May 22, 2019 6:09 AM, "Soumen Khatua" wrote: > > Hi Folks, > > I'm getting this error "TypeError:" everytime, Can You guys tell me where is the problem in this code. it would help us a lot if you would copy the entire traceback and paste it into an e

TypeError

2019-05-22 Thread Soumen Khatua
Hi Folks, I'm getting this error "TypeError:" everytime, Can You guys tell me where is the problem in this code. *Cart* views.py @require_POST def cart_add(request,product_id): cart = Cart(request) product = get_object_or_404(Product,id = product_id) form = forms.CartAddP

How to make the mock object iterable ['TypeError: 'Mock' object is not iterable'] Need to Mock the django query that is iterating through for loop

2019-05-08 Thread Shashank Gupta
I am trying to mock the below django query object : 1.) if MyModel.objects.filter(data='some_data').exists(): then 2.) for row in MyModel.objects.filter(ListId=id): I am trying to test below django query inside my method. def my_method(some_parameter): if

Re: Unhashable TypeError when deleted from model, Django 2.2

2019-04-17 Thread Sithembewena L. Dube
ednesday, April 17, 2019 11:18 AM > *To:* django-users@googlegroups.com > *Subject:* RE: Unhashable TypeError when deleted from model, Django 2.2 > > > > Hi Sithu, > > I would still need to a way determine when a record expires. A Boolean > wouldn’t help in that regard. > &g

RE: Unhashable TypeError when deleted from model, Django 2.2

2019-04-17 Thread Matthew Pava
AM To: django-users@googlegroups.com Subject: RE: Unhashable TypeError when deleted from model, Django 2.2 Hi Sithu, I would still need to a way determine when a record expires. A Boolean wouldn’t help in that regard. But I think this error has something to do with Django’s delete method

RE: Unhashable TypeError when deleted from model, Django 2.2

2019-04-17 Thread Matthew Pava
] On Behalf Of Sithembewena L. Dube Sent: Tuesday, April 16, 2019 2:49 PM To: django-users@googlegroups.com Subject: Re: Unhashable TypeError when deleted from model, Django 2.2 Why not use a boolean field on the model to denote expires? Then if that field is True, delete the object? I think

Re: Unhashable TypeError when deleted from model, Django 2.2

2019-04-16 Thread Sithembewena L. Dube
ny record that has an expires > date that has passed, and I keep getting a TypeError that Model is > unhashable. Am I doing something wrong? > > > > Model.objects.filter(expires__lt=timezone.now()).delete() > > > > Here’s the traceback: > > > > Tracebac

Unhashable TypeError when deleted from model, Django 2.2

2019-04-16 Thread Matthew Pava
I have a model that has a nullable field called expires. If expires is null, then the record never expires. I'm performing a delete on the model for any record that has an expires date that has passed, and I keep getting a TypeError that Model is unhashable. Am I doing something wrong

Re: Getting a TypeError

2019-04-16 Thread laudrup
Hi Aakash, Aakash Baranwal – Tue, 16. April 2019 13:12 > Hi Kasper, > Thanks a lot for your help. I did as you suggested. > This is the code now: > def video_detail_view(request, pk=None): # pk == idobj = > get_object_or_404(Video, pk=pk)print(obj)context = {"object": obj}return >

Re: Getting a TypeError

2019-04-16 Thread laudrup
Hi Aakash, Aakash Baranwal – Tue, 16. April 2019 11:12 > The error I am getting is:int() argument must be a string, a bytes-like object > or a number not 'builtin_function_or_method'. > > The error is in views.py file in obj = str(Video.objects.get(id=id)). You need to pass an id argument to

Getting a TypeError

2019-04-16 Thread Aakash Baranwal
Hi Everybody, Kindly help me out. My views.py file is: def video_detail_view(request): obj = str(Video.objects.get(id=id)) print(obj) context = { "object": obj } return render(request, "deploy/list_view.html", context) def video_list_view(request): queryset = Video.objects.all()

Re: TypeError unsupported operand type(s) for *: 'NoneType' and 'int'

2019-04-07 Thread omar ahmed
ok i understood thanks for help On Sunday, April 7, 2019 at 11:58:50 AM UTC+2, Roger Gammans wrote: > > Omar, > > When posting question to the list it's good practice to practice tell us a > little bit about what your trying to do, and how what > actions cause the error to occur. > > In this

Re: TypeError unsupported operand type(s) for *: 'NoneType' and 'int'

2019-04-07 Thread Roger Gammans
Omar, When posting question to the list it's good practice to practice tell us a little bit about what your trying to do, and how what actions cause the error to occur. In this case though you only have a (single line in CalcPoints) which uses the '*' operator. On Sat, 2019-04-06 at 10:35

TypeError unsupported operand type(s) for *: 'NoneType' and 'int'

2019-04-06 Thread omar ahmed
models.py class Club(models.Model): league_names = models.ForeignKey(League, on_delete= models.CASCADE, related_name='club') name = models.CharField(max_length=100) logo = models.ImageField(upload_to='media/core', max_length=255, null=True, blank=True) won = models.IntegerField() draw =

Django channels raises TypeError on close: An asyncio.Future, a coroutine or an awaitable is required

2019-03-23 Thread Rodrigo Bistolfi
op=loop) for f in set(fs)} File "/usr/local/lib/python3.7/asyncio/tasks.py", line 361, in fs = {ensure_future(f, loop=loop) for f in set(fs)} File "/usr/local/lib/python3.7/asyncio/tasks.py", line 592, in ensure_future raise TypeError('An asyncio.Future, a corouti

Re: How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-26 Thread Abba Haruna
thank you -- 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 post to this group, send email to

Re: How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-22 Thread Jason
on_delete is a required parameter now in django 2.0 https://docs.djangoproject.com/en/2.0/releases/2.0/#features-removed-in-2-0 - The on_delete argument for ForeignKey and OneToOneField is now required in models and migrations. Consider squashing migrations so that you have fewer of

Re: How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-22 Thread vineeth sagar
For a foreign keys you have to specify an on_delete attribute, food=models.ForiegnKey(Food,on_delete=models.CASCADE) If a row in the parent table(food for example) is deleted this will cause the row/s that refers to that particular food item in your Restraunt model be deleted. on_delete can be

How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-22 Thread Abba Haruna
from django.db import models class Food(models.Model): name = models.CharField(max_length=30) picture = models.ImageField(upload_to='images/', null=True) def __unicode__(self): return self.name class Town(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return

Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-11-12 Thread Jason
path('login/', auth_views.LoginView, {'template_name':'accounts/login.html'} name='login'), There's no comma to separate the kwarg dict from the `name` positional argument. As you can see in the docs https://docs.djangoproject.com/en/2.1/ref/urls/#path, the path function takes four params:

Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-11-12 Thread Alex Callaway
_views #from django.contrib.auth import login from django.contrib.auth.views import LoginView urlpatterns=[ re_path(r'^$',views.home, name='home'), path('login/', auth_views.LoginView, {'template_name':'accounts/login.html'} name='login'), ] And I get this error : *TypeError at /accounts/login

Re: path('/',views.polls_details,name="polls_details") TypeError: list indices must be integers or slices, not tuple

2018-10-11 Thread Daniel Hepper
Happens to the best of us :) Glad I could help! - Daniel On Thu, Oct 11, 2018 at 11:54 AM tribhuvan kishor < tribhuvankishor...@gmail.com> wrote: > thanks man ... i was doing school boy error . thanks for shaving my day :) > > On Thu, Oct 11, 2018 at 3:20 PM Daniel Hepper > wrote: > >> You

Re: path('/',views.polls_details,name="polls_details") TypeError: list indices must be integers or slices, not tuple

2018-10-11 Thread tribhuvan kishor
thanks man ... i was doing school boy error . thanks for shaving my day :) On Thu, Oct 11, 2018 at 3:20 PM Daniel Hepper wrote: > You are missing a =. It should be: > > urlpatterns = [ > ... > ] > > instead of: > > urlpatterns[ > ... > ] > > On Thu, Oct 11, 2018 at 11:42 AM tribhuvan kishor < >

Re: path('/',views.polls_details,name="polls_details") TypeError: list indices must be integers or slices, not tuple

2018-10-11 Thread Daniel Hepper
You are missing a =. It should be: urlpatterns = [ ... ] instead of: urlpatterns[ ... ] On Thu, Oct 11, 2018 at 11:42 AM tribhuvan kishor < tribhuvankishor...@gmail.com> wrote: > please help me I am searching about this error throw out DAY . > > -- > regards > Tribhuvan Kishor Bhaskar > > --

Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-08-27 Thread Alex Kimeu
mplate_name': 'users/login.html'}, name='login'), > # Logout page > url('logout/', views.logout_view, name='logout'), > ] > > > > > TypeError at /users/login/ > > __init__() takes 1 positional argument but 2 were given > > Request Method: GET > Request URL: http://local

Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-08-27 Thread Jason
you changed the import to something else, right? but you didn't change the actual use of the old import to the new. On Monday, August 27, 2018 at 8:05:03 AM UTC-4, Tim Vogt wrote: > > Thanks I tired bout get another error > > File "/Users/timvogt/Software_projects/learning_log/users/urls.py",

Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-08-27 Thread Tim Vogt (Tim Vogt)
Thanks I tired bout get another error File "/Users/timvogt/Software_projects/learning_log/users/urls.py", line 15, in url('login/', login, {'template_name': 'users/login.html'}, name='login'), NameError: name 'login' is not defined """Defines URL patterns for users""" from

Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-08-27 Thread Jason
you're importing the wrong login. you need to import the login view. almost there, just from django.contrib.auth.views import LoginView -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread ansh srivastav
) >> File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line >> 400, in urlconf_module >> return import_module(self.urlconf_name) >> File "/usr/lib/python3.6/importlib/__init__.py", line 126, in >> import_module >> return _bootstrap._gcd_import(na

Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread Aware Fun
File "", line 955, in > _find_and_load_unlocked > File "", line 665, in _load_unlocked > File "", line 678, in exec_module > File "", line 219, in > _call_with_frames_removed > File "/home/herve/Bureau/mes_projets/eboutique/ebout

Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread Glen D souza
eturn _bootstrap._gcd_import(name[level:], package, level) > File "", line 994, in _gcd_import > File "", line 971, in _find_and_load > File "", line 955, in > _find_and_load_unlocked > File "", line 665, in _load_unlocked > File "&qu

  1   2   3   4   5   >