Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
i tried running my server then i got this updated_at=models.DataField(auto_now_add=True) AttributeError: module 'django.db.models' has no attribute 'DataField'
Based on the line of the error, here is the code exactly where the error was detected.
id=models.AutoField(primary_key=True)
name=models.CharField(max_length=225)
email=models.CharField(max_length=224)
password=models.CharField(max_length=225)
created_at=models.DateField(auto_now_add=True)
updated_at=models.DataField(auto_now_add=True)
objects=models.Manaager()
Kindly help me as i am new to python
You wrote DataField, instead it should DateField.
Also Manaager should be Manager.
Your code should look like this:
id=models.AutoField(primary_key=True)
name=models.CharField(max_length=225)
email=models.CharField(max_length=224)
password=models.CharField(max_length=225)
created_at=models.DateField(auto_now_add=True)
updated_at=models.DataField(auto_now_add=True)
objects=models.Manager()
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 months ago.
Improve this question
I used this code:
randomstr = '',join((random.choice(chars)) for x in range(10))
It comes up with this error:
NameError: name 'join' is not defined
I expected a picture file to be saved after being uploaded.
You made a mistake putting "," , the join comes after the "."
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
when i run the code, the error shows up. What can i do to repair it?
Error: [1]: https://i.stack.imgur.com/yNJAq.png
Code: [1]: https://i.stack.imgur.com/OECRS.png
(Code is not finished yet)
There is one extra space in your code where you are calling flip() method.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I am getting an attribute error for one of my python class, but I declared it in the init function for the class. I do not know what I am doing wrong
You spelt "__init__" wrongly as "__int__"
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I am working on Object detection with tensorflow api. I take codes on githup and try to debug and I face to face that error.
File "<ipython-input-10-7adfcc2a8173>", line 3, in <module>
with detection_graph.as_defult():
AttributeError: 'Graph' object has no attribute 'as_defult'
No problem with my camera. I aldready installed which necessary every module
PLSS help me
thank you
Without your code I cannot be entirely certain it is the only issue, but I think you are getting the error because of a misspelling. It should be as_default instead of as_defult. Use detection_graph.as_default() instead.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I'm attempting to make a Dungeons and Dragons like game in Python, but I seem to have hit a wall. Whenever I run this code
file.write("Name:" (str(Char2)))
It returns
str object is not callable
You are using "file.write()" function. Inside parentheses you must put string. When you use "Name:" (str(Char2)) the Pythton see "Name:" as a function.
In other words, try this:
file.write("Name:{}".format(str(Char2)))
If you would like understand more see 6.1.3. Format String Syntax in this link: https://docs.python.org/3.4/library/string.html