Re: OperationalError at /admin/login database or disk is full

2022-05-28 Thread Paul Kudla (SCOM.CA Internet Services Inc.)



ok i will assume you are running a flavor of unix aka linux, freebsd etc

/admin/login is a mount point but it depends on your hdd layout

for example depending on your hdd initalization


# df
Filesystem   SizeUsed 
Avail Capacity  Mounted on
zroot/ROOT/default   393G3.3G 
389G 1%/
devfs1.0K1.0K 
0B   100%/dev
zroot/var/tmp389G 96K 
389G 0%/var/tmp
zroot/tmp389G136K 
389G 0%/tmp
zroot/var/log389G1.4M 
389G 0%/var/log
zroot389G 96K 
389G 0%/zroot
zroot/var/mail   389G148K 
389G 0%/var/mail
zroot/usr/src391G1.7G 
389G 0%/usr/src
zroot/var/audit  389G 96K 
389G 0%/var/audit
zroot/usr/ports  399G9.4G 
389G 2%/usr/ports
zroot/usr/home   431G 42G 
389G10%/usr/home
zroot/var/crash  389G 96K 
389G 0%/var/crash


when you do s 'df' to list you hdd's it will give you the partition 
layouts and avaliable hdd space


if /admin/login is on it own partition then it probably has reduced size?

check that first

make sure you data base is running where there is plenty of space (ie /usr/)

otherwise post back your hdd layout

and do a

ps -axww

and return the process layouts

between the two you should be able to figure out where your database, 
dhango etc lives and go from there


keep in mind that default locations usually work but sometimes not 
pending how your system was formatted.






Happy Saturday !!!
Thanks - paul

Paul Kudla


Scom.ca Internet Services <http://www.scom.ca>
004-1009 Byron Street South
Whitby, Ontario - Canada
L1N 4S3

Toronto 416.642.7266
Main 1.866.411.7266
Fax 1.888.892.7266
Email p...@scom.ca

On 5/27/2022 5:37 PM, Andrew Rea wrote:

Hello!

This is my first post in this group so be gentle.

I'm creating a new Django project, and I've successfully created a 
superuser. But when I try to access the Admin page of my project with my 
superuser credentials, I receive this error:


OperationalError at /admin/login/
database or disk is full

Is this because my SQLite database is full from other projects? Or 
possibly because I have too many virtual envs from those same other 
projects? *Or* is it due to my personal computer's disk being too full?


Thank you in advance,

Andrew S. Rea

--
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 
<mailto:django-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d96ae214-4c6f-43c7-ae94-7fba910e68a1n%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/d96ae214-4c6f-43c7-ae94-7fba910e68a1n%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
This message has been scanned for viruses and
dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
believed to be clean.


--
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://groups.google.com/d/msgid/django-users/ed6369f9-23f7-d3ce-38e2-4c1437496fd2%40scom.ca.


Re: OperationalError at /admin/login database or disk is full

2022-05-27 Thread Clive Bruton



On 27 May 2022, at 22:37, Andrew Rea wrote:


OperationalError at /admin/login/
database or disk is full

Is this because my SQLite database is full from other projects? Or  
possibly because I have too many virtual envs from those same other  
projects? Or is it due to my personal computer's disk being too full?


I wouldn't bet on it, but I suspect that you do not have the correct  
permissions to write to the database. Because your HD really isn't  
full, is it?



-- Clive

--
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://groups.google.com/d/msgid/django-users/CE3C33E3-7796-4ED5-92E5-190DDEBDE91E%40indx.co.uk.


OperationalError at /admin/login database or disk is full

2022-05-27 Thread Andrew Rea
Hello!

This is my first post in this group so be gentle. 

I'm creating a new Django project, and I've successfully created a 
superuser. But when I try to access the Admin page of my project with my 
superuser credentials, I receive this error:

OperationalError at /admin/login/ 
database or disk is full

Is this because my SQLite database is full from other projects? Or possibly 
because I have too many virtual envs from those same other projects? *Or* is 
it due to my personal computer's disk being too full?

Thank you in advance,

Andrew S. Rea

-- 
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://groups.google.com/d/msgid/django-users/d96ae214-4c6f-43c7-ae94-7fba910e68a1n%40googlegroups.com.


Re: OperationalError: foreign key mismatch

2021-07-28 Thread Wai Yeung
Yes.  Thank you.

On Tue., Jul. 27, 2021, 9:16 p.m. DJANGO DEVELOPER, 
wrote:

> so issue resolved now?
>
> On Tue, Jul 27, 2021 at 9:09 PM Wai Yeung  wrote:
>
>> Hello,
>>
>> Thanks for the suggestion.  I actually changed it to the following to as
>> to not have the "_id" suffix:
>>
>> filename_number =
>> models.ForeignKey(FilenameTbl,db_column='filename_number',
>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>
>> This is what eventually worked for me:
>>
>> https://stackoverflow.com/questions/68537031/how-do-i-resolve-the-following-error-in-django-operationalerror-foreign-key-m
>>
>> Cheers,
>> Wai
>>
>> On Mon, Jul 26, 2021 at 9:32 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> can you please  change your object from this:
>>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
>>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>> to :
>>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename',
>>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>>
>>> On Tue, Jul 27, 2021 at 1:53 AM Wai Yeung  wrote:
>>>
>>>> Hello,
>>>>
>>>> I'm getting the following error whenever I attempt to save to the table
>>>> in a SQLite database:
>>>>
>>>> foreign key mismatch - "procedure_tbl" referencing "filename_tbl"
>>>>
>>>> In models.py, these are the tables that the error is refering to:
>>>>
>>>> class FilenameTbl(models.Model):
>>>> rowid = models.AutoField(auto_created=True, primary_key=True,
>>>> serialize=False, verbose_name='FileID', db_column='rowid')
>>>> filename = models.TextField(blank=True, null=True)
>>>> creation_datetime = models.TextField(blank=True, null=True)
>>>>
>>>> class Meta:
>>>> managed = False
>>>> db_table = 'filename_tbl'
>>>> ordering = ['rowid']
>>>>
>>>>
>>>> class ProcedureTbl(models.Model):
>>>> rowid = models.AutoField(auto_created=True, primary_key=True,
>>>> serialize=False, verbose_name='ProcedureID', db_column='rowid')
>>>> ...
>>>> filename_id =
>>>> models.ForeignKey(FilenameTbl,db_column='filename_id',
>>>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>>>
>>>> class Meta:
>>>> managed = False
>>>> db_table = 'procedure_tbl'
>>>> ordering = ['rowid']
>>>>
>>>> Data can be read from the tables and querysets like the following
>>>> return the correct data:
>>>> queryset = FilenameTbl.objects.values(
>>>> 'rowid', 'filename',
>>>> 'proceduretbl__rowid')
>>>>
>>>> Raw SQLite commands to write/update to the ProcedureTbl table function
>>>> properly.
>>>>
>>>> If I removed filename_id from the ProcedureTbl, then data can be saved
>>>> to the table.
>>>>
>>>> Any insight into the issue would be much appreciated.
>>>>
>>>> Cheers,
>>>> Wai
>>>>
>>>>
>>>>
>>>> --
>>>> 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://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/nqYRTN3m6Bg/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users+u

Re: OperationalError: foreign key mismatch

2021-07-27 Thread DJANGO DEVELOPER
so issue resolved now?

On Tue, Jul 27, 2021 at 9:09 PM Wai Yeung  wrote:

> Hello,
>
> Thanks for the suggestion.  I actually changed it to the following to as
> to not have the "_id" suffix:
>
> filename_number =
> models.ForeignKey(FilenameTbl,db_column='filename_number',
> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>
> This is what eventually worked for me:
>
> https://stackoverflow.com/questions/68537031/how-do-i-resolve-the-following-error-in-django-operationalerror-foreign-key-m
>
> Cheers,
> Wai
>
> On Mon, Jul 26, 2021 at 9:32 PM DJANGO DEVELOPER 
> wrote:
>
>> can you please  change your object from this:
>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>> to :
>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename',
>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>
>> On Tue, Jul 27, 2021 at 1:53 AM Wai Yeung  wrote:
>>
>>> Hello,
>>>
>>> I'm getting the following error whenever I attempt to save to the table
>>> in a SQLite database:
>>>
>>> foreign key mismatch - "procedure_tbl" referencing "filename_tbl"
>>>
>>> In models.py, these are the tables that the error is refering to:
>>>
>>> class FilenameTbl(models.Model):
>>> rowid = models.AutoField(auto_created=True, primary_key=True,
>>> serialize=False, verbose_name='FileID', db_column='rowid')
>>> filename = models.TextField(blank=True, null=True)
>>> creation_datetime = models.TextField(blank=True, null=True)
>>>
>>> class Meta:
>>> managed = False
>>> db_table = 'filename_tbl'
>>> ordering = ['rowid']
>>>
>>>
>>> class ProcedureTbl(models.Model):
>>> rowid = models.AutoField(auto_created=True, primary_key=True,
>>> serialize=False, verbose_name='ProcedureID', db_column='rowid')
>>> ...
>>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
>>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>>
>>> class Meta:
>>> managed = False
>>> db_table = 'procedure_tbl'
>>> ordering = ['rowid']
>>>
>>> Data can be read from the tables and querysets like the following return
>>> the correct data:
>>> queryset = FilenameTbl.objects.values(
>>> 'rowid', 'filename',
>>> 'proceduretbl__rowid')
>>>
>>> Raw SQLite commands to write/update to the ProcedureTbl table function
>>> properly.
>>>
>>> If I removed filename_id from the ProcedureTbl, then data can be saved
>>> to the table.
>>>
>>> Any insight into the issue would be much appreciated.
>>>
>>> Cheers,
>>> Wai
>>>
>>>
>>>
>>> --
>>> 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://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/nqYRTN3m6Bg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKPY9pkH2pp3bkARsviqUdmn007Hc30ckrVOPH4yTBakJqXjDw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKPY9pkH2pp3bkARsviqUdmn007Hc30ckrVOPH4yTBakJqXjDw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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://groups.google.com/d/msgid/django-users/CAKDLG%3DTx_oX5o7fhW9aaeMcyXsqhB2GsqRujLAxy1HVi3QjBPg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKDLG%3DTx_oX5o7fhW9aaeMcyXsqhB2GsqRujLAxy1HVi3QjBPg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAKPY9p%3D-zeLdKNLg990KO%3D9PczU0WNEG2H7j9jfs9xis2ZLrOg%40mail.gmail.com.


Re: OperationalError: foreign key mismatch

2021-07-27 Thread Wai Yeung
Hello,

Thanks for the suggestion.  I actually changed it to the following to as to
not have the "_id" suffix:

filename_number =
models.ForeignKey(FilenameTbl,db_column='filename_number',
to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)

This is what eventually worked for me:
https://stackoverflow.com/questions/68537031/how-do-i-resolve-the-following-error-in-django-operationalerror-foreign-key-m

Cheers,
Wai

On Mon, Jul 26, 2021 at 9:32 PM DJANGO DEVELOPER 
wrote:

> can you please  change your object from this:
> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
> to :
> filename_id = models.ForeignKey(FilenameTbl,db_column='filename',
> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>
> On Tue, Jul 27, 2021 at 1:53 AM Wai Yeung  wrote:
>
>> Hello,
>>
>> I'm getting the following error whenever I attempt to save to the table
>> in a SQLite database:
>>
>> foreign key mismatch - "procedure_tbl" referencing "filename_tbl"
>>
>> In models.py, these are the tables that the error is refering to:
>>
>> class FilenameTbl(models.Model):
>> rowid = models.AutoField(auto_created=True, primary_key=True,
>> serialize=False, verbose_name='FileID', db_column='rowid')
>> filename = models.TextField(blank=True, null=True)
>> creation_datetime = models.TextField(blank=True, null=True)
>>
>> class Meta:
>> managed = False
>> db_table = 'filename_tbl'
>> ordering = ['rowid']
>>
>>
>> class ProcedureTbl(models.Model):
>> rowid = models.AutoField(auto_created=True, primary_key=True,
>> serialize=False, verbose_name='ProcedureID', db_column='rowid')
>> ...
>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>
>> class Meta:
>> managed = False
>> db_table = 'procedure_tbl'
>> ordering = ['rowid']
>>
>> Data can be read from the tables and querysets like the following return
>> the correct data:
>> queryset = FilenameTbl.objects.values(
>> 'rowid', 'filename',
>> 'proceduretbl__rowid')
>>
>> Raw SQLite commands to write/update to the ProcedureTbl table function
>> properly.
>>
>> If I removed filename_id from the ProcedureTbl, then data can be saved to
>> the table.
>>
>> Any insight into the issue would be much appreciated.
>>
>> Cheers,
>> Wai
>>
>>
>>
>> --
>> 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://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/nqYRTN3m6Bg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKPY9pkH2pp3bkARsviqUdmn007Hc30ckrVOPH4yTBakJqXjDw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKPY9pkH2pp3bkARsviqUdmn007Hc30ckrVOPH4yTBakJqXjDw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAKDLG%3DTx_oX5o7fhW9aaeMcyXsqhB2GsqRujLAxy1HVi3QjBPg%40mail.gmail.com.


Re: OperationalError: foreign key mismatch

2021-07-26 Thread DJANGO DEVELOPER
can you please  change your object from this:
filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
to :
filename_id = models.ForeignKey(FilenameTbl,db_column='filename',
to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)

On Tue, Jul 27, 2021 at 1:53 AM Wai Yeung  wrote:

> Hello,
>
> I'm getting the following error whenever I attempt to save to the table in
> a SQLite database:
>
> foreign key mismatch - "procedure_tbl" referencing "filename_tbl"
>
> In models.py, these are the tables that the error is refering to:
>
> class FilenameTbl(models.Model):
> rowid = models.AutoField(auto_created=True, primary_key=True,
> serialize=False, verbose_name='FileID', db_column='rowid')
> filename = models.TextField(blank=True, null=True)
> creation_datetime = models.TextField(blank=True, null=True)
>
> class Meta:
> managed = False
> db_table = 'filename_tbl'
> ordering = ['rowid']
>
>
> class ProcedureTbl(models.Model):
> rowid = models.AutoField(auto_created=True, primary_key=True,
> serialize=False, verbose_name='ProcedureID', db_column='rowid')
> ...
> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>
> class Meta:
> managed = False
> db_table = 'procedure_tbl'
> ordering = ['rowid']
>
> Data can be read from the tables and querysets like the following return
> the correct data:
> queryset = FilenameTbl.objects.values(
> 'rowid', 'filename',
> 'proceduretbl__rowid')
>
> Raw SQLite commands to write/update to the ProcedureTbl table function
> properly.
>
> If I removed filename_id from the ProcedureTbl, then data can be saved to
> the table.
>
> Any insight into the issue would be much appreciated.
>
> Cheers,
> Wai
>
>
>
> --
> 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://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAKPY9pkH2pp3bkARsviqUdmn007Hc30ckrVOPH4yTBakJqXjDw%40mail.gmail.com.


OperationalError: foreign key mismatch

2021-07-26 Thread Wai Yeung
Hello,

I'm getting the following error whenever I attempt to save to the table in 
a SQLite database:

foreign key mismatch - "procedure_tbl" referencing "filename_tbl"

In models.py, these are the tables that the error is refering to:

class FilenameTbl(models.Model):
rowid = models.AutoField(auto_created=True, primary_key=True, 
serialize=False, verbose_name='FileID', db_column='rowid')
filename = models.TextField(blank=True, null=True)
creation_datetime = models.TextField(blank=True, null=True)

class Meta:
managed = False
db_table = 'filename_tbl'
ordering = ['rowid']


class ProcedureTbl(models.Model):
rowid = models.AutoField(auto_created=True, primary_key=True, 
serialize=False, verbose_name='ProcedureID', db_column='rowid')
...
filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id', 
to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)

class Meta:
managed = False
db_table = 'procedure_tbl'
ordering = ['rowid']

Data can be read from the tables and querysets like the following return 
the correct data:
queryset = FilenameTbl.objects.values(
'rowid', 'filename',
'proceduretbl__rowid')

Raw SQLite commands to write/update to the ProcedureTbl table function 
properly.

If I removed filename_id from the ProcedureTbl, then data can be saved to 
the table.

Any insight into the issue would be much appreciated.

Cheers,
Wai



-- 
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://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com.


Re: OperationalError at /admin/products/product/add/

2021-05-24 Thread Kasper Laudrup
Learn how to ask a question. This could be a good start:

https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd

Kind regards,

Kasper Laudrup

-- 
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://groups.google.com/d/msgid/django-users/2b8e50ae-d490-ee15-f0b7-07d11ffe1af1%40stacktrace.dk.


OpenPGP_signature
Description: OpenPGP digital signature


OperationalError at /admin/products/product/add/

2021-05-24 Thread Harsh Saini
s, 
**kwargs) File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\models\query.py" in 
_insert 1125. return query.get_compiler(using=using).execute_sql(return_id) 
File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\models\sql\compiler.py" 
in execute_sql 1285. cursor.execute(sql, params) File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\backends\utils.py" 
in execute 100. return super().execute(sql, params) File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\backends\utils.py" 
in execute 68. return self._execute_with_wrappers(sql, params, many=False, 
executor=self._execute) File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\backends\utils.py" 
in _execute_with_wrappers 77. return executor(sql, params, many, context) File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\backends\utils.py" 
in _execute 85. return self.cursor.execute(sql, params) File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\utils.py" in 
__exit__ 89. raise dj_exc_value.with_traceback(traceback) from exc_value File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\backends\utils.py" 
in _execute 85. return self.cursor.execute(sql, params) File 
"C:\Dev\trydjango\trydjango\lib\site-packages\django\db\backends\sqlite3\base.py"
 
in execute 303. return Database.Cursor.execute(self, query, params) Exception 
Type: OperationalError at /admin/products/product/add/ Exception Value: no 
such table: main.auth_user__old

-- 
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://groups.google.com/d/msgid/django-users/10bc6f79-eaab-4f30-83fa-5ae9075e352bn%40googlegroups.com.


Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread ramadhan ngallen
In short, it happens when the application which writes to the sqlite database 
does not have write permission.

You have to add writing rights to the directory in which your sqlite database 
is stored. So running chmod 664 /srv/mysite should help.
This is a security risk, so better solution is to change the owner of your 
database to www-data:
chown www-data:www-data /srv/mysite
chown www-data:www-data /srv/mysite/DATABASE.sqlite
On 3 May 2020, 22:31 +0300, Amina Anna Mahamane.O , wrote:
>
> 
> Envoyé de mon iPhone
>
> > Le 3 mai 2020 à 15:25, Jorge Gimeno  a écrit :
> >
> >
> >
> > > On Sun, May 3, 2020 at 3:46 AM Amina Anna Mahamane.O 
> > >  wrote:
> > > > I read , but I didn’t help me , I don’t really know hiw to process . 
> > > > Can you explain me ?
> > >
> > > I'm not a linux expert, so other folks can feel free to correct me.
> > >
> > > In linux, the user that creates the file in a directory they have access 
> > > to has "ownership" of the file.  With that, the user can both read and 
> > > write to the file.  All other users (except for sudo users, I believe) 
> > > have read-only access by default.
> > >
> > > That's what's happening here.  When you ran migrations as the currently 
> > > logged in user, your user has read and write permissions.  Apache, 
> > > however, runs as a different user, so it cannot write to the database.
> > >
> > > That answer I linked did have some things to try, in addition to a link 
> > > to more general question about permissions.  The file you would need to 
> > > change permissioins on (since you're using sqlite3, which is file based) 
> > > is named (without quotes) "db.sqlite3'.
> > >
> > > Hope this helps!
> > >
> > > -Jorge
> > > >
> > > > Envoyé de mon iPhone
> > > >
> > > > > Le 3 mai 2020 à 05:21, Jorge Gimeno  a écrit :
> > > > >
> > > > >
> > > > >
> > > > > > On Sat, May 2, 2020 at 8:09 PM Amina Anna Mahamane.O 
> > > > > >  wrote:
> > > > > > > Hello , I started learning how to use django . I made a project 
> > > > > > > without a virtual environnement and without apach2 andn mod wsgi .
> > > > > > > Now am I trying to do a project with those ones . I am a beginner 
> > > > > > > .When I try to log in to the administration interface, the error 
> > > > > > > below appears.I've been looking for solutions on the internet for 
> > > > > > > hours and hours but I didn't find anything which can help me to 
> > > > > > > solve my problem. I have no idea what could have caused this 
> > > > > > > error.I really need help, it's urgent. I wish someone can answer 
> > > > > > > to me in french but if it is not possible, help me anyway, I will 
> > > > > > > manage.
> > > > > > >
> > > > > > > OperationalError at /admin/login/
> > > > > > > attempt to write a readonly database
> > > > > > > Request Method:
> > > > > > > POST
> > > > > > > Request URL:
> > > > > > > http://www.djangoproject.localhost/admin/login/?next=/admin/
> > > > > > > Django Version:
> > > > > > > 3.0.5
> > > > > > > Exception Type:
> > > > > > > OperationalError
> > > > > > > Exception Value:
> > > > > > > attempt to write a readonly database
> > > > > > > Exception Location:
> > > > > > > /home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
> > > > > > >  in execute, line 396
> > > > > > > Python Executable:
> > > > > > > /home/kirikou/mysite/env/bin/python
> > > > > > > Python Version:
> > > > > > > 3.7.5
> > > > > > > Python Path:
> > > > > > > ['/home/kirikou/mysite',
> > > > > > > '/usr/lib/python37.zip',
> > > > > > > '/usr/lib/python3.7',
> > > > > > > '/usr/lib/python3.7/lib-dynload',
> > > > > > > '/home/kirikou/mysite/env/lib/python3.7/site-packages']
> > > > >

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread Amina Anna Mahamane.O
I changed the permissions,but nothing changed 😢.

Envoyé de mon iPhone

> Le 3 mai 2020 à 15:25, Jorge Gimeno  a écrit :
> 
> 
> 
> 
>> On Sun, May 3, 2020 at 3:46 AM Amina Anna Mahamane.O  
>> wrote:
>> I read , but I didn’t help me , I don’t really know hiw to process . Can you 
>> explain me ? 
> 
> I'm not a linux expert, so other folks can feel free to correct me.
> 
> In linux, the user that creates the file in a directory they have access to 
> has "ownership" of the file.  With that, the user can both read and write to 
> the file.  All other users (except for sudo users, I believe) have read-only 
> access by default.
> 
> That's what's happening here.  When you ran migrations as the currently 
> logged in user, your user has read and write permissions.  Apache, however, 
> runs as a different user, so it cannot write to the database.
> 
> That answer I linked did have some things to try, in addition to a link to 
> more general question about permissions.  The file you would need to change 
> permissioins on (since you're using sqlite3, which is file based) is named 
> (without quotes) "db.sqlite3'.
> 
> Hope this helps!
> 
> -Jorge
>> 
>> Envoyé de mon iPhone
>> 
>>>> Le 3 mai 2020 à 05:21, Jorge Gimeno  a écrit :
>>>> 
>>> 
>>> 
>>> 
>>>> On Sat, May 2, 2020 at 8:09 PM Amina Anna Mahamane.O  
>>>> wrote:
>>>> Hello , I started learning how to use django . I made a project without a 
>>>> virtual environnement and without apach2 andn mod wsgi .
>>>> Now am I trying to do a project with those ones . I am a beginner .When I 
>>>> try to log in to the administration interface, the error below 
>>>> appears.I've been looking for solutions on the internet for hours and 
>>>> hours but I didn't find anything which can help me to solve my problem. I 
>>>> have no idea what could have caused this error.I really need help, it's 
>>>> urgent. I wish someone can answer to me in french but if it is not 
>>>> possible, help me anyway, I will manage.
>>>> 
>>>> OperationalError at /admin/login/
>>>> 
>>>> attempt to write a readonly database
>>>> Request Method:POST
>>>> Request URL:   
>>>> http://www.djangoproject.localhost/admin/login/?next=/admin/
>>>> Django Version:3.0.5
>>>> Exception Type:OperationalError
>>>> Exception Value:   
>>>> attempt to write a readonly database
>>>> Exception Location:
>>>> /home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
>>>>  in execute, line 396
>>>> Python Executable: /home/kirikou/mysite/env/bin/python
>>>> Python Version:3.7.5
>>>> Python Path:   
>>>> ['/home/kirikou/mysite',
>>>>  '/usr/lib/python37.zip',
>>>>  '/usr/lib/python3.7',
>>>>  '/usr/lib/python3.7/lib-dynload',
>>>>  '/home/kirikou/mysite/env/lib/python3.7/site-packages']
>>>> Server time:   Sat, 2 May 2020 21:39:20 +
>>>> 
>>>> 
>>>> 
>>>> Environment:
>>>> 
>>>> 
>>>> Request Method: POST
>>>> Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/
>>>> 
>>>> Django Version: 3.0.5
>>>> Python Version: 3.7.5
>>>> Installed Applications:
>>>> ['applis.apps.ApplisConfig',
>>>>  'django.contrib.admin',
>>>>  'django.contrib.auth',
>>>>  'django.contrib.contenttypes',
>>>>  'django.contrib.sessions',
>>>>  'django.contrib.messages',
>>>>  'django.contrib.staticfiles',
>>>>  'django.contrib.admindocs']
>>>> Installed Middleware:
>>>> ['django.middleware.security.SecurityMiddleware',
>>>>  'django.contrib.sessions.middleware.SessionMiddleware',
>>>>  'django.middleware.common.CommonMiddleware',
>>>>  'django.middleware.csrf.CsrfViewMiddleware',
>>>>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>>>>  'django.contrib.messages.middleware.MessageMiddleware',
>>>>  'django.middleware.clickjacking.XFrameOptionsMiddleware']
>>>> 
>>>>

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread Jorge Gimeno
On Sun, May 3, 2020 at 3:46 AM Amina Anna Mahamane.O 
wrote:

> I read , but I didn’t help me , I don’t really know hiw to process . Can
> you explain me ?
>

I'm not a linux expert, so other folks can feel free to correct me.

In linux, the user that creates the file in a directory they have access to
has "ownership" of the file.  With that, the user can both read and write
to the file.  All other users (except for sudo users, I believe) have
read-only access by default.

That's what's happening here.  When you ran migrations as the currently
logged in user, your user has read and write permissions.  Apache, however,
runs as a different user, so it cannot write to the database.

That answer I linked did have some things to try, in addition to a link to
more general question about permissions.  The file you would need to change
permissioins on (since you're using sqlite3, which is file based) is named
(without quotes) "db.sqlite3'.

Hope this helps!

-Jorge

>
> Envoyé de mon iPhone
>
> Le 3 mai 2020 à 05:21, Jorge Gimeno  a écrit :
>
> 
>
>
> On Sat, May 2, 2020 at 8:09 PM Amina Anna Mahamane.O 
> wrote:
>
>> Hello , I started learning how to use django . I made a project without a
>> virtual environnement and without apach2 andn mod wsgi .
>> Now am I trying to do a project with those ones . I am a beginner .When
>> I try to log in to the administration interface, the error below appears.I've
>> been looking for solutions on the internet for hours and hours but I didn't
>> find anything which can help me to solve my problem. I have no idea what
>> could have caused this error.I really need help, it's urgent. I wish
>> someone can answer to me in french but if it is not possible, help me
>> anyway, I will manage.
>>
>> OperationalError at /admin/login/
>>
>> attempt to write a readonly database
>>
>> Request Method: POST
>> Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/
>> Django Version: 3.0.5
>> Exception Type: OperationalError
>> Exception Value:
>>
>> attempt to write a readonly database
>>
>> Exception Location: 
>> /home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
>> in execute, line 396
>> Python Executable: /home/kirikou/mysite/env/bin/python
>> Python Version: 3.7.5
>> Python Path:
>>
>> ['/home/kirikou/mysite',
>>  '/usr/lib/python37.zip',
>>  '/usr/lib/python3.7',
>>  '/usr/lib/python3.7/lib-dynload',
>>  '/home/kirikou/mysite/env/lib/python3.7/site-packages']
>>
>> Server time: Sat, 2 May 2020 21:39:20 +
>>
>>
>>
>> Environment:
>>
>>
>> Request Method: POST
>> Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/
>>
>> Django Version: 3.0.5
>> Python Version: 3.7.5
>> Installed Applications:
>> ['applis.apps.ApplisConfig',
>>  'django.contrib.admin',
>>  'django.contrib.auth',
>>  'django.contrib.contenttypes',
>>  'django.contrib.sessions',
>>  'django.contrib.messages',
>>  'django.contrib.staticfiles',
>>  'django.contrib.admindocs']
>> Installed Middleware:
>> ['django.middleware.security.SecurityMiddleware',
>>  'django.contrib.sessions.middleware.SessionMiddleware',
>>  'django.middleware.common.CommonMiddleware',
>>  'django.middleware.csrf.CsrfViewMiddleware',
>>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>>  'django.contrib.messages.middleware.MessageMiddleware',
>>  'django.middleware.clickjacking.XFrameOptionsMiddleware']
>>
>>
>>
>> Traceback (most recent call last):
>>   File
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/utils.py",
>> line 86, in _execute
>> return self.cursor.execute(sql, params)
>>   File
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py",
>> line 396, in execute
>> return Database.Cursor.execute(self, query, params)
>>
>> The above exception (attempt to write a readonly database) was the direct
>> cause of the following exception:
>>   File
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/exception.py",
>> line 34, in inner
>> response = get_response(request)
>>   File
>> "/home/kirikou/mysite/env/lib/python3.7/site-

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread Amina Anna Mahamane.O
I read , but I didn’t help me , I don’t really know hiw to process . Can you 
explain me ? 

Envoyé de mon iPhone

> Le 3 mai 2020 à 05:21, Jorge Gimeno  a écrit :
> 
> 
> 
> 
>> On Sat, May 2, 2020 at 8:09 PM Amina Anna Mahamane.O  
>> wrote:
>> Hello , I started learning how to use django . I made a project without a 
>> virtual environnement and without apach2 andn mod wsgi .
>> Now am I trying to do a project with those ones . I am a beginner .When I 
>> try to log in to the administration interface, the error below appears.I've 
>> been looking for solutions on the internet for hours and hours but I didn't 
>> find anything which can help me to solve my problem. I have no idea what 
>> could have caused this error.I really need help, it's urgent. I wish someone 
>> can answer to me in french but if it is not possible, help me anyway, I will 
>> manage.
>> 
>> OperationalError at /admin/login/
>> 
>> attempt to write a readonly database
>> Request Method:  POST
>> Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/
>> Django Version:  3.0.5
>> Exception Type:  OperationalError
>> Exception Value: 
>> attempt to write a readonly database
>> Exception Location:  
>> /home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
>>  in execute, line 396
>> Python Executable:   /home/kirikou/mysite/env/bin/python
>> Python Version:  3.7.5
>> Python Path: 
>> ['/home/kirikou/mysite',
>>  '/usr/lib/python37.zip',
>>  '/usr/lib/python3.7',
>>  '/usr/lib/python3.7/lib-dynload',
>>  '/home/kirikou/mysite/env/lib/python3.7/site-packages']
>> Server time: Sat, 2 May 2020 21:39:20 +
>> 
>> 
>> 
>> Environment:
>> 
>> 
>> Request Method: POST
>> Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/
>> 
>> Django Version: 3.0.5
>> Python Version: 3.7.5
>> Installed Applications:
>> ['applis.apps.ApplisConfig',
>>  'django.contrib.admin',
>>  'django.contrib.auth',
>>  'django.contrib.contenttypes',
>>  'django.contrib.sessions',
>>  'django.contrib.messages',
>>  'django.contrib.staticfiles',
>>  'django.contrib.admindocs']
>> Installed Middleware:
>> ['django.middleware.security.SecurityMiddleware',
>>  'django.contrib.sessions.middleware.SessionMiddleware',
>>  'django.middleware.common.CommonMiddleware',
>>  'django.middleware.csrf.CsrfViewMiddleware',
>>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>>  'django.contrib.messages.middleware.MessageMiddleware',
>>  'django.middleware.clickjacking.XFrameOptionsMiddleware']
>> 
>> 
>> 
>> Traceback (most recent call last):
>>   File 
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/utils.py",
>>  line 86, in _execute
>> return self.cursor.execute(sql, params)
>>   File 
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py",
>>  line 396, in execute
>> return Database.Cursor.execute(self, query, params)
>> 
>> The above exception (attempt to write a readonly database) was the direct 
>> cause of the following exception:
>>   File 
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/exception.py",
>>  line 34, in inner
>> response = get_response(request)
>>   File 
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/base.py",
>>  line 115, in _get_response
>> response = self.process_exception_by_middleware(e, request)
>>   File 
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/base.py",
>>  line 113, in _get_response
>> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>>   File 
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/views/decorators/cache.py",
>>  line 44, in _wrapped_view_func
>> response = view_func(request, *args, **kwargs)
>>   File 
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/contrib/admin/sites.py",
>>  line 407, in login
>> return LoginView.as_view(**defaults)(request)
>>   File 
>> "/home/kirikou/mysite/env/lib/python3.7/site-packages/djang

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-02 Thread Jorge Gimeno
On Sat, May 2, 2020 at 8:09 PM Amina Anna Mahamane.O 
wrote:

> Hello , I started learning how to use django . I made a project without a
> virtual environnement and without apach2 andn mod wsgi .
> Now am I trying to do a project with those ones . I am a beginner .When I
> try to log in to the administration interface, the error below appears.I've
> been looking for solutions on the internet for hours and hours but I didn't
> find anything which can help me to solve my problem. I have no idea what
> could have caused this error.I really need help, it's urgent. I wish
> someone can answer to me in french but if it is not possible, help me
> anyway, I will manage.
>
> OperationalError at /admin/login/
>
> attempt to write a readonly database
>
> Request Method: POST
> Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/
> Django Version: 3.0.5
> Exception Type: OperationalError
> Exception Value:
>
> attempt to write a readonly database
>
> Exception Location: 
> /home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
> in execute, line 396
> Python Executable: /home/kirikou/mysite/env/bin/python
> Python Version: 3.7.5
> Python Path:
>
> ['/home/kirikou/mysite',
>  '/usr/lib/python37.zip',
>  '/usr/lib/python3.7',
>  '/usr/lib/python3.7/lib-dynload',
>  '/home/kirikou/mysite/env/lib/python3.7/site-packages']
>
> Server time: Sat, 2 May 2020 21:39:20 +
>
>
>
> Environment:
>
>
> Request Method: POST
> Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/
>
> Django Version: 3.0.5
> Python Version: 3.7.5
> Installed Applications:
> ['applis.apps.ApplisConfig',
>  'django.contrib.admin',
>  'django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'django.contrib.admindocs']
> Installed Middleware:
> ['django.middleware.security.SecurityMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.common.CommonMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware',
>  'django.middleware.clickjacking.XFrameOptionsMiddleware']
>
>
>
> Traceback (most recent call last):
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/utils.py",
> line 86, in _execute
> return self.cursor.execute(sql, params)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py",
> line 396, in execute
> return Database.Cursor.execute(self, query, params)
>
> The above exception (attempt to write a readonly database) was the direct
> cause of the following exception:
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/exception.py",
> line 34, in inner
> response = get_response(request)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/base.py",
> line 115, in _get_response
> response = self.process_exception_by_middleware(e, request)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/base.py",
> line 113, in _get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/views/decorators/cache.py",
> line 44, in _wrapped_view_func
> response = view_func(request, *args, **kwargs)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/contrib/admin/sites.py",
> line 407, in login
> return LoginView.as_view(**defaults)(request)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/views/generic/base.py",
> line 71, in view
> return self.dispatch(request, *args, **kwargs)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/utils/decorators.py",
> line 43, in _wrapper
> return bound_method(*args, **kwargs)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/views/decorators/debug.py",
> line 76, in sensitive_post_parameters_wrapper
> return view(request, *args, **kwargs)
>   File
> "/home/kirikou/mysite/env/lib/python3.7/site-packages/django/utils/decorators.py",
> line 43, in 

OperationalError at /admin/login/attempt to write a readonly database

2020-05-02 Thread Amina Anna Mahamane.O
Hello , I started learning how to use django . I made a project without a 
virtual environnement and without apach2 andn mod wsgi .
Now am I trying to do a project with those ones . I am a beginner .When I 
try to log in to the administration interface, the error below appears.I've 
been looking for solutions on the internet for hours and hours but I didn't 
find anything which can help me to solve my problem. I have no idea what 
could have caused this error.I really need help, it's urgent. I wish 
someone can answer to me in french but if it is not possible, help me 
anyway, I will manage.

OperationalError at /admin/login/ 

attempt to write a readonly database

Request Method: POST 
Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/ 
Django Version: 3.0.5 
Exception Type: OperationalError 
Exception Value: 

attempt to write a readonly database

Exception Location: 
/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
 
in execute, line 396 
Python Executable: /home/kirikou/mysite/env/bin/python 
Python Version: 3.7.5 
Python Path: 

['/home/kirikou/mysite',
 '/usr/lib/python37.zip',
 '/usr/lib/python3.7',
 '/usr/lib/python3.7/lib-dynload',
 '/home/kirikou/mysite/env/lib/python3.7/site-packages']

Server time: Sat, 2 May 2020 21:39:20 +



Environment:


Request Method: POST
Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/

Django Version: 3.0.5
Python Version: 3.7.5
Installed Applications:
['applis.apps.ApplisConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admindocs']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/utils.py",
 
line 86, in _execute
return self.cursor.execute(sql, params)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py",
 
line 396, in execute
return Database.Cursor.execute(self, query, params)

The above exception (attempt to write a readonly database) was the direct 
cause of the following exception:
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/exception.py",
 
line 34, in inner
response = get_response(request)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/base.py",
 
line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/core/handlers/base.py",
 
line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/views/decorators/cache.py",
 
line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/contrib/admin/sites.py",
 
line 407, in login
return LoginView.as_view(**defaults)(request)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/views/generic/base.py",
 
line 71, in view
return self.dispatch(request, *args, **kwargs)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/utils/decorators.py",
 
line 43, in _wrapper
return bound_method(*args, **kwargs)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/views/decorators/debug.py",
 
line 76, in sensitive_post_parameters_wrapper
return view(request, *args, **kwargs)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/utils/decorators.py",
 
line 43, in _wrapper
return bound_method(*args, **kwargs)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/utils/decorators.py",
 
line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/utils/decorators.py",
 
line 43, in _wrapper
return bound_method(*args, **kwargs)
  File 
"/home/kirikou/mysite/env/lib/python3.7/site-packages/django/views/decorators/cache.py",
 
line 44, in _wrapped_view_func
response = view_func(

Upgrade django-synchro for django 2.2 : OperationalError - no such table: django_content_type"

2019-07-06 Thread Loys Masquelier

Hello,

From : 
https://stackoverflow.com/questions/56875632/upgrade-django-synchro-for-django-2-2-operationalerror-no-such-table-django


I am trying to upgrade django-synchro to django 2.2. I have already 
upgraded the project to django 2.1 but I have now a problem with 
ContentType object


The upgraded version to django 2.1 can be found here 
<https://github.com/mlier/django-synchro>


(python runtests.py works, all tests pass)

With django 2.2.3 I have the error

   django.db.utils.OperationalError: no such table: django_content_type

It seems that at initialisation, migrations are done on default database 
and the rest it is done on test database (in memory). So ContentType are 
not seen in the rest of the code. An error occur when |models.py| is 
read |(content_type = models.ForeignKey(ContentType, 
on_delete=models.CASCADE))|


*Any ideas would be very appreciated...*

I have looked in Django 2.2 release notes 
<https://docs.djangoproject.com/en/2.2/releases/2.2/#backwards-incompatible-2-2>


There are two backwards incompatible changes in 2.2 that can maybe do 
the error :


   TransactionTestCase serialized data loading : Initial data
   migrations are now loaded in TransactionTestCase at the end of the
   test, after the database flush. In older versions, this data was
   loaded at the beginning of the test, but this prevents the test
   --keepdb option from working properly (the database was empty at the
   end of the whole test suite). This change shouldn’t have an impact
   on your tests unless you’ve customized TransactionTestCase’s internals.

   Test : Deferrable database constraints are now checked at the end of
   each TestCase test on SQLite 3.20+, just like on other backends that
   support deferrable constraints. These checks aren’t implemented for
   older versions of SQLite because they would require expensive table
   introspection there.





--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2500d7aa-72ac-e9dc-acbf-24180c570748%40free.fr.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrading from 1.11 to 2.0: "sqlite3.OperationalError: no such table"

2018-05-08 Thread Informatico Neurodesarrollo

Check 1.11 to 2.0 upgrade.
You already checked the project configuration and make migrations ?, it 
could be changed with the upgrade!!!

I will hope help you.

PD I'm a beginner in Django.

El 06/05/18 a las 23:38, Michael Gauland escribió:
Just in case anyone else runs into this, I fixed it by specifying 
db_contraint=False for foreign keys which cross databases.

--
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 django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aaca2372-f0f3-4e60-98cc-b7f906867606%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--

Jesús Reyes Piedra
Admin Red Neurodesarrollo,Cárdenas
La caja decía:"Requiere windows 95 o superior"...
Entonces instalé LINUX.



--
Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5AF1F35F.8060903%40infomed.sld.cu.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrading from 1.11 to 2.0: "sqlite3.OperationalError: no such table"

2018-05-06 Thread Michael Gauland
Just in case anyone else runs into this, I fixed it by specifying 
db_contraint=False for foreign keys which cross databases.

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aaca2372-f0f3-4e60-98cc-b7f906867606%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Upgrading from 1.11 to 2.0: "sqlite3.OperationalError: no such table"

2018-05-03 Thread Michael Gauland
I've got a project that's been developed using django 1.11. I've tried 
upgrading to 2.0, but now I'm getting an error I haven't been able to track 
down.

My database engine is sqlite3. I have three database files:
  - db.sqlite3 is the default. This is the only one that django manages, 
and the only one that is writable.
  - components.sqlite3 contains a library of engineering component data. 
  - slat_constants.sqlite3 contains constants used by the project. In 
particular, the 'slat_locations' table holds information about sites in NZ.

I have a Model that exposes the location data:
class Location(models.Model):
location = models.CharField(max_length=128)
z = models.FloatField()
min_distance = models.FloatField(null = True)
max_disstance = models.FloatField(null = True)

class Meta:
managed = False
db_table = 'slat_location'

and another that uses it:
class NZ_Standard_Curve(models.Model):
SOIL_CLASS_A = 'A'
SOIL_CLASS_B = 'B'
SOIL_CLASS_C = 'C'
SOIL_CLASS_D = 'D'
SOIL_CLASS_E = 'E'
SOIL_CLASS_CHOICES = (
(SOIL_CLASS_A, 'A'),
(SOIL_CLASS_B, 'B'),
(SOIL_CLASS_C, 'C'),
(SOIL_CLASS_D, 'D'),
(SOIL_CLASS_E, 'E')
)

soil_class = models.CharField(max_length=1,
  choices=SOIL_CLASS_CHOICES,
  default=SOIL_CLASS_A)
period = models.FloatField(default=1.5)
location = models.ForeignKey(Location, on_delete=PROTECT, 
null=False)

...and a test script that creates an NZ_Standard_Curve, and tries to save 
it:

location = Location.objects.get(location='Christchurch')
curve = NZ_Standard_Curve(location=location, 
   soil_class='C',
   period=1.5)
curve.save()

If I don't try to save the curve, the test passes. The save() call fails 
with:

sqlite3.OperationalError: no such table: main.slat_location

Again, this all works with django 1.11.13. I've tried creating a fresh 
database, and making new migrations, but that hasn't helped. 

I've wondered if the leading 'main.' in the table name is a clue, but that 
hasn't led me anywhere yet.

Any suggestions? 

Kind Regards,
Michael Gauland

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7f89596e-c7f0-44ff-a13f-a5779701a80a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError

2018-05-03 Thread Gerald Brown

Thanks for the reply.  Will check it out.  Just printed the documentation.


On Friday, 04 May, 2018 03:08 AM, 'Anthony Flury' via Django users wrote:

Django 2.0 docs suggest using reportlab :

https://docs.djangoproject.com/en/2.0/howto/outputting-pdf/

I had some success with : pupeteer - 
http://django-puppeteer-pdf.readthedocs.io/en/latest/ - which works by 
having a CBV type framework - so you subclass a PDF template view - 
and that will autogenerate a PDF for you - you just need to have 
unique urls for the PDFs.




On 03/05/18 13:22, Gerald Brown wrote:


FINALLY. SUCCESS!!! What I ended up doing to correct the problem was 
to drop the whole database (NO RECORDS YET). When I tried to run 
migrations it said there were no changes.  I then had to run 
makemigrations  and migrate  so I am now back 
in business!!!


Now does anyone know of an *easy* way to create PDF documents in 
Django???


Thanks to all for the suggestions and ideas!!!

On Thursday, May 3, 2018 at 6:13:35 PM UTC+8, Gerald Brown wrote:

    I finally discovered what I think is the cause of my problem.
    *DJANGO MIGRATIONS ARE NOT WORKING.*On the system that has the
    problem is where I made migration to change some of the field
    names.  The fields that were not found where the ones that did get
    changed but the old unchanged names were still there.  On another
    system that is working NONE of the fields names were changed so it
    didn't have any unknown fields. Both systems had migrations run
    against the model file where some fields had changes made and the
    other one NO changes were made and on a third machine all changes
    were made.

    /Who knows what evil lurks in the heart of the computer? *The
    Shadow knows!!!* /


    On Wednesday, 02 May, 2018 07:56 AM, Gerald Brown wrote:

    I have a Django application that I am having problems with.  In
    the Admin page I have 3 sections, ABC, DEF & XYZ. Each has 1
    option to "Add/Change".  In 2 of them when I click on the option
    it works fine. The third gives me the following error "
    *1054, "Unknown column 'xyz_xyz.first_name' in "field list" *The
    Exception location is:
*/home/medrec1/.virtualenvs/medrecproj/lib/python3.5/site-packages/*MySQLdb*/connections.py
    in query, line 277* On another system (both running the same
    code) I was also getting a different error also in
    *site-packages/MySQLdb* but I was able correct that by installing
    2 DEV packages and then  installing MySQLClient, which I also 
did on this computer.  The other

    system does NOT give this error.

    Any ideas, suggestions, solutions on how to solve this error and 
any other errors in the Django code?


    Thanks.

    --     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
    django-users@googlegroups.com 
.

    Visit this group at https://groups.google.com/group/django-users
    .
    To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/74790172-8bf5-43b6-9bad-bab68ae11a4a%40googlegroups.com
.
    For more options, visit https://groups.google.com/d/optout
    .


--
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 django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e17d8d56-d57c-4f3d-ae6f-a004a5beda70%40googlegroups.com 
. 


For more options, visit https://groups.google.com/d/optout.





--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1b0f87d9-620e-3b4e-f848-538a665276cc%40gmail.com.
For more options, visit https://groups.

Re: OperationalError

2018-05-03 Thread 'Anthony Flury' via Django users

Django 2.0 docs suggest using reportlab :

https://docs.djangoproject.com/en/2.0/howto/outputting-pdf/

I had some success with : pupeteer - 
http://django-puppeteer-pdf.readthedocs.io/en/latest/ - which works by 
having a CBV type framework - so you subclass a PDF template view - and 
that will autogenerate a PDF for you - you just need to have unique urls 
for the PDFs.




On 03/05/18 13:22, Gerald Brown wrote:


FINALLY. SUCCESS!!! What I ended up doing to correct the problem was 
to drop the whole database (NO RECORDS YET). When I tried to run 
migrations it said there were no changes.  I then had to run 
makemigrations  and migrate  so I am now back 
in business!!!


Now does anyone know of an *easy* way to create PDF documents in Django???

Thanks to all for the suggestions and ideas!!!

On Thursday, May 3, 2018 at 6:13:35 PM UTC+8, Gerald Brown wrote:

I finally discovered what I think is the cause of my problem.
*DJANGO MIGRATIONS ARE NOT WORKING.*On the system that has the
problem is where I made migration to change some of the field
names.  The fields that were not found where the ones that did get
changed but the old unchanged names were still there.  On another
system that is working NONE of the fields names were changed so it
didn't have any unknown fields. Both systems had migrations run
against the model file where some fields had changes made and the
other one NO changes were made and on a third machine all changes
were made.

/Who knows what evil lurks in the heart of the computer? *The
Shadow knows!!!* /


On Wednesday, 02 May, 2018 07:56 AM, Gerald Brown wrote:

I have a Django application that I am having problems with.  In
the Admin page I have 3 sections, ABC, DEF & XYZ. Each has 1
option to "Add/Change".  In 2 of them when I click on the option
it works fine. The third gives me the following error "
*1054, "Unknown column 'xyz_xyz.first_name' in "field list" *The
Exception location is:

*/home/medrec1/.virtualenvs/medrecproj/lib/python3.5/site-packages/*MySQLdb*/connections.py
in query, line 277* On another system (both running the same
code) I was also getting a different error also in
*site-packages/MySQLdb* but I was able correct that by installing
2 DEV packages and then  installing MySQLClient, which I also did on this 
computer.  The other
system does NOT give this error.

Any ideas, suggestions, solutions on how to solve this error and any other 
errors in the Django code?

Thanks.

-- 
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
django-users@googlegroups.com .
Visit this group at https://groups.google.com/group/django-users
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/74790172-8bf5-43b6-9bad-bab68ae11a4a%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout
.


--
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 django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e17d8d56-d57c-4f3d-ae6f-a004a5beda70%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
--
Anthony Flury
email : *anthony.fl...@btinternet.com*
Twitter : *@TonyFlury *

--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ce2f9885-bb30-3386-0411-b4b022cafca2%40btinternet.com.
For more options, visit https://groups.google.com/d/optout.


RE: OperationalError

2018-05-03 Thread Matthew Pava
I use PhantomJS with Django to create PDFs.  I just pass in the URL with the 
session variable (to maintain authentication) and a few other parameters into a 
customized Rasterize.js script.
Is it an “easy” way?  I wouldn’t say so, but it works for us.

It gets really crazy when you start asking, “Does anyone know of an easy way to 
print in Django?”  It’s not easy, but it can be done in an appropriate 
environment.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Gerald Brown
Sent: Thursday, May 3, 2018 7:22 AM
To: Django users
Subject: Re: OperationalError


FINALLY. SUCCESS!!! What I ended up doing to correct the problem was to drop 
the whole database (NO RECORDS YET). When I tried to run migrations it said 
there were no changes.  I then had to run makemigrations  and 
migrate  so I am now back in business!!!

Now does anyone know of an easy way to create PDF documents in Django???

Thanks to all for the suggestions and ideas!!!

On Thursday, May 3, 2018 at 6:13:35 PM UTC+8, Gerald Brown wrote:

I finally discovered what I think is the cause of my problem. DJANGO 
MIGRATIONS ARE NOT WORKING. On the system that has the problem is where I made 
migration to change some of the field names.  The fields that were not found 
where the ones that did get changed but the old unchanged names were still 
there.  On another system that is working NONE of the fields names were changed 
so it didn't have any unknown fields. Both systems had migrations run against 
the model file where some fields had changes made and the other one NO changes 
were made and on a third machine all changes were made.

Who knows what evil lurks in the heart of the computer? The Shadow knows!!!

On Wednesday, 02 May, 2018 07:56 AM, Gerald Brown wrote:
I have a Django application that I am having problems with.  In the Admin page 
I have 3 sections, ABC, DEF & XYZ. Each has 1 option to "Add/Change".  In 2 of 
them when I click on the option it works fine. The third gives me the following 
error "

1054, "Unknown column 'xyz_xyz.first_name' in "field list"



The Exception location is: 
/home/medrec1/.virtualenvs/medrecproj/lib/python3.5/site-packages/MySQLdb/connections.py
 in query,

line 277



On another system (both running the same code) I was also getting a different 
error also in site-packages/MySQLdb but I was

able correct that by installing 2 DEV packages and then installing MySQLClient, 
which I also did on this computer.  The other

system does NOT give this error.



Any ideas, suggestions, solutions on how to solve this error and any other 
errors in the Django code?



Thanks.


--
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<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/74790172-8bf5-43b6-9bad-bab68ae11a4a%40googlegroups.com<https://groups.google.com/d/msgid/django-users/74790172-8bf5-43b6-9bad-bab68ae11a4a%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e17d8d56-d57c-4f3d-ae6f-a004a5beda70%40googlegroups.com<https://groups.google.com/d/msgid/django-users/e17d8d56-d57c-4f3d-ae6f-a004a5beda70%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e5e175015b1d445f979cfc318cf32eec%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError

2018-05-03 Thread Gerald Brown

FINALLY. SUCCESS!!! What I ended up doing to correct the problem was to 
drop the whole database (NO RECORDS YET). When I tried to run migrations it 
said there were no changes.  I then had to run makemigrations  
and migrate  so I am now back in business!!!

Now does anyone know of an *easy* way to create PDF documents in Django???

Thanks to all for the suggestions and ideas!!!

On Thursday, May 3, 2018 at 6:13:35 PM UTC+8, Gerald Brown wrote:
>
> I finally discovered what I think is the cause of my problem. *DJANGO 
> MIGRATIONS ARE NOT WORKING. *On the system that has the problem is where 
> I made migration to change some of the field names.  The fields that were 
> not found where the ones that did get changed but the old unchanged names 
> were still there.  On another system that is working NONE of the fields 
> names were changed so it didn't have any unknown fields. Both systems had 
> migrations run against the model file where some fields had changes made 
> and the other one NO changes were made and on a third machine all changes 
> were made.
>
> *Who knows what evil lurks in the heart of the computer? The Shadow 
> knows!!! *
>
> On Wednesday, 02 May, 2018 07:56 AM, Gerald Brown wrote:
>
> I have a Django application that I am having problems with.  In the Admin 
> page I have 3 sections, ABC, DEF & XYZ. Each has 1 option to "Add/Change".  
> In 2 of them when I click on the option it works fine. The third gives me 
> the following error "
>
> *1054, "Unknown column 'xyz_xyz.first_name' in "field list"
>
> *The Exception location is: 
> */home/medrec1/.virtualenvs/medrecproj/lib/python3.5/site-packages/*MySQLdb*/connections.py
>  in query, 
> line 277*
> On another system (both running the same code) I was also getting a different 
> error also in *site-packages/MySQLdb* but I was
> able correct that by installing 2 DEV packages and then installing 
> MySQLClient, which I also did on this computer.  The other
> system does NOT give this error.
>
> Any ideas, suggestions, solutions on how to solve this error and any other 
> errors in the Django code?
>
> Thanks.
>
>
> -- 
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/74790172-8bf5-43b6-9bad-bab68ae11a4a%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e17d8d56-d57c-4f3d-ae6f-a004a5beda70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError

2018-05-03 Thread Gerald Brown
I finally discovered what I think is the cause of my problem. *DJANGO 
MIGRATIONS ARE NOT WORKING.*On the system that has the problem is where 
I made migration to change some of the field names.  The fields that 
were not found where the ones that did get changed but the old unchanged 
names were still there.  On another system that is working NONE of the 
fields names were changed so it didn't have any unknown fields. Both 
systems had migrations run against the model file where some fields had 
changes made and the other one NO changes were made and on a third 
machine all changes were made.


/Who knows what evil lurks in the heart of the computer? *The Shadow 
knows!!!* /



On Wednesday, 02 May, 2018 07:56 AM, Gerald Brown wrote:
I have a Django application that I am having problems with.  In the 
Admin page I have 3 sections, ABC, DEF & XYZ. Each has 1 option to 
"Add/Change".  In 2 of them when I click on the option it works fine. 
The third gives me the following error "
*1054, "Unknown column 'xyz_xyz.first_name' in "field list" *The 
Exception location is: 
*/home/medrec1/.virtualenvs/medrecproj/lib/python3.5/site-packages/*MySQLdb*/connections.py 
in query, line 277* On another system (both running the same code) I 
was also getting a different error also in *site-packages/MySQLdb* but 
I was able correct that by installing 2 DEV packages and then  installing MySQLClient, which I also did on this computer.  The other

system does NOT give this error.

Any ideas, suggestions, solutions on how to solve this error and any other 
errors in the Django code?

Thanks.

--
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 django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/74790172-8bf5-43b6-9bad-bab68ae11a4a%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/43790a35-4c51-ff0e-09c0-2fbcdad6c9f1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError

2018-05-02 Thread Gerald Brown
Been there. Done that. Many times!!!  Still can't find the field list 
that it is complaining about.


What is really weird is that the same code runs on 2 other computers 
without any errors.



On Wednesday, 02 May, 2018 09:16 PM, Matthew Pava wrote:


“>>>>random letters & numbers”

That looks like merge conflicts with Git.  You’ll want to fix those 
up, not just by deleting those lines, but by verifying the code does 
what you want it to.


You may want to just delete all of your migrations files and start 
anew if they’re not important to you.


*From:*django-users@googlegroups.com 
[mailto:django-users@googlegroups.com] *On Behalf Of *Gerald Brown

*Sent:* Wednesday, May 2, 2018 4:08 AM
*To:* Anthony Flury; django-users@googlegroups.com
*Subject:* Re: OperationalError

Thanks for the reply.

I have done the makemigrations/migrate numerous times.  Each time it 
says there is an error in the previous migration file so I have to 
comment out most of the file.  I then just deleted all of the self 
generated migration files and started fresh.


I was also getting some weird characters in my files like ">>>>random 
letters & numbers.  I deleted all of those & ran the migrations again.


The weird thing is that now when I click on the link it says "unknown 
column telephone in field list", previously it was first_name that was 
unknown.


I have this application running on a "similar" computer and it has 
*NO* problems with this area so maybe there are some other 
applications running that cause the problem even though this one is in 
a virtualenv.


On Wednesday, 02 May, 2018 03:00 PM, Anthony Flury wrote:

At first glance it looks like you haven't applied a migration to
this computer.

at the command line on this computer  - in the man project
directory :

If you have not copied the migration scripts from your development
machine do this first :

   $ python manage.py makemigrations

and then do this :

   $ python manage.py migrate

--
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 
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com 
<mailto:django-users@googlegroups.com>.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5499b870-33e8-52db-85e2-df835be17e87%40gmail.com 
<https://groups.google.com/d/msgid/django-users/5499b870-33e8-52db-85e2-df835be17e87%40gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.

--
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 
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com 
<mailto:django-users@googlegroups.com>.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/21802186cf2749e6b6e191e8fc78ce26%40ISS1.ISS.LOCAL 
<https://groups.google.com/d/msgid/django-users/21802186cf2749e6b6e191e8fc78ce26%40ISS1.ISS.LOCAL?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9ad1a0d3-9243-a539-e584-b9f1fcb78962%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: OperationalError

2018-05-02 Thread Matthew Pava
“>>>>random letters & numbers”

That looks like merge conflicts with Git.  You’ll want to fix those up, not 
just by deleting those lines, but by verifying the code does what you want it 
to.
You may want to just delete all of your migrations files and start anew if 
they’re not important to you.


From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Gerald Brown
Sent: Wednesday, May 2, 2018 4:08 AM
To: Anthony Flury; django-users@googlegroups.com
Subject: Re: OperationalError


Thanks for the reply.

I have done the makemigrations/migrate numerous times.  Each time it says there 
is an error in the previous migration file so I have to comment out most of the 
file.  I then just deleted all of the self generated migration files and 
started fresh.

I was also getting some weird characters in my files like ">>>>random letters & 
numbers.  I deleted all of those & ran the migrations again.

The weird thing is that now when I click on the link it says "unknown column 
telephone in field list", previously it was first_name that was unknown.

I have this application running on a "similar" computer and it has NO problems 
with this area so maybe there are some other applications running that cause 
the problem even though this one is in a virtualenv.

On Wednesday, 02 May, 2018 03:00 PM, Anthony Flury wrote:
At first glance it looks like you haven't applied a migration to this computer.

at the command line on this computer  - in the man project directory :

If you have not copied the migration scripts from your development machine do 
this first :

   $ python manage.py makemigrations

and then do this :

   $ python manage.py migrate

--
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<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5499b870-33e8-52db-85e2-df835be17e87%40gmail.com<https://groups.google.com/d/msgid/django-users/5499b870-33e8-52db-85e2-df835be17e87%40gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/21802186cf2749e6b6e191e8fc78ce26%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError

2018-05-02 Thread Gerald Brown

Thanks for the reply.

I have done the makemigrations/migrate numerous times.  Each time it 
says there is an error in the previous migration file so I have to 
comment out most of the file.  I then just deleted all of the self 
generated migration files and started fresh.


I was also getting some weird characters in my files like "random 
letters & numbers.  I deleted all of those & ran the migrations again.


The weird thing is that now when I click on the link it says "unknown 
column telephone in field list", previously it was first_namethat was 
unknown.


I have this application running on a "similar" computer and it has *NO* 
problems with this area so maybe there are some other applications 
running that cause the problem even though this one is in a virtualenv.



On Wednesday, 02 May, 2018 03:00 PM, Anthony Flury wrote:
At first glance it looks like you haven't applied a migration to this 
computer.


at the command line on this computer  - in the man project directory :

If you have not copied the migration scripts from your development 
machine do this first :


   $ python manage.py makemigrations

and then do this :

   $ python manage.py migrate



--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5499b870-33e8-52db-85e2-df835be17e87%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError

2018-05-02 Thread 'Anthony Flury' via Django users
At first glance it looks like you haven't applied a migration to this 
computer.


at the command line on this computer  - in the man project directory :

If you have not copied the migration scripts from your development 
machine do this first :


   $ python manage.py makemigrations

and then do this :

   $ python manage.py migrate

--
--
Anthony Flury
email : *anthony.fl...@btinternet.com*
Twitter : *@TonyFlury 

*On 02/05/18 00:56, Gerald Brown wrote:
I have a Django application that I am having problems with.  In the 
Admin page I have 3 sections, ABC, DEF & XYZ. Each has 1 option to 
"Add/Change".  In 2 of them when I click on the option it works fine. 
The third gives me the following error "
*1054, "Unknown column 'xyz_xyz.first_name' in "field list" *The 
Exception location is: 
*/home/medrec1/.virtualenvs/medrecproj/lib/python3.5/site-packages/*MySQLdb*/connections.py 
in query, line 277* On another system (both running the same code) I 
was also getting a different error also in *site-packages/MySQLdb* but 
I was able correct that by installing 2 DEV packages and then  installing MySQLClient, which I also did on this computer.  The other

system does NOT give this error.

Any ideas, suggestions, solutions on how to solve this error and any other 
errors in the Django code?

Thanks.

--
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 django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/74790172-8bf5-43b6-9bad-bab68ae11a4a%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
--
Anthony Flury
email : *anthony.fl...@btinternet.com*
Twitter : *@TonyFlury *

--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ee20f787-ae18-f407-de84-b4122d9f304d%40btinternet.com.
For more options, visit https://groups.google.com/d/optout.


OperationalError

2018-05-01 Thread Gerald Brown
I have a Django application that I am having problems with.  In the Admin 
page I have 3 sections, ABC, DEF & XYZ. Each has 1 option to "Add/Change".  
In 2 of them when I click on the option it works fine. The third gives me 
the following error "



*1054, "Unknown column 'xyz_xyz.first_name' in "field list"*The Exception 
location is: 
*/home/medrec1/.virtualenvs/medrecproj/lib/python3.5/site-packages/*MySQLdb
*/connections.py in query, line 277*

On another system (both running the same code) I was also getting a different 
error also in *site-packages/MySQLdb* but I was
able correct that by installing 2 DEV packages and then installing MySQLClient, 
which I also did on this computer.  The other
system does NOT give this error.

Any ideas, suggestions, solutions on how to solve this error and any other 
errors in the Django code?

Thanks.

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/74790172-8bf5-43b6-9bad-bab68ae11a4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError at /checkout/ table orders_order has no column named order_id

2016-08-07 Thread M Hashmi
urn super(AddressSelectFormView, self).dispatch(*args, 
> **kwargs)
>
>
> def get_addresses(self, *args, **kwargs):
> user_check_id = self.request.session.get("user_checkout_id")
> user_checkout = UserCheckout.objects.get(id=user_check_id)
> b_address = UserAddress.objects.filter(
> user=user_checkout,
> type='billing',
> )
> s_address = UserAddress.objects.filter(
> user=user_checkout,
> type='shipping',
> )
> return b_address, s_address
>
>
> def get_form(self, *args, **kwargs):
> form = super(AddressSelectFormView, self).get_form(*args, **kwargs)
> b_address, s_address = self.get_addresses()
>
> form.fields["billing_address"].queryset = b_address
> form.fields["shipping_address"].queryset = s_address
> return form
>
> def form_valid(self, form, *args, **kwargs):
> billing_address = form.cleaned_data["billing_address"]
> shipping_address = form.cleaned_data["shipping_address"]
> order = self.get_order()
> order.billing_address = billing_address
> order.shipping_address = shipping_address
> order.save()
> return  super(AddressSelectFormView, self).form_valid(form, *args, 
> **kwargs)
>
> def get_success_url(self, *args, **kwargs):
> return "/checkout/"
>
> *Error I get when checking out is:*
>
> Environment:
>
>
> Request Method: GET
> Request URL: http://localhost:8000/checkout/
>
> Django Version: 1.8.5
> Python Version: 2.7.9
> Installed Applications:
> ('django.contrib.admin',
>  'django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'blog',
>  'products',
>  'orders',
>  'carts',
>  'newsletter',
>  'crispy_forms',
>  'registration',
>  'colorfield',
>  'hitcount')
> Installed Middleware:
> ('django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.common.CommonMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware',
>  'django.middleware.clickjacking.XFrameOptionsMiddleware')
>
>
> Traceback:
> File 
> "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\core\handlers\base.py"
>  
> in get_response
>   132. response = wrapped_callback(request, 
> *callback_args, **callback_kwargs)
> File 
> "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\views\generic\base.py"
>  
> in view
>   71. return self.dispatch(request, *args, **kwargs)
> File 
> "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\views\generic\base.py"
>  
> in dispatch
>   89. return handler(request, *args, **kwargs)
> File "C:\Users\Mudassar\dressikarepo\src\carts\views.py" in get
>   188. get_data = super(CheckoutView, self).get(request, *args, 
> **kwargs)
> File 
> "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\views\generic\detail.py"
>  
> in get
>   116. context = self.get_context_data(object=self.object)
> File "C:\Users\Mudassar\dressikarepo\src\carts\views.py" in 
> get_context_data
>   167. context["order"] = self.get_order()
> File "C:\Users\Mudassar\dressikarepo\src\orders\mixins.py" in get_order
>   22. new_order = Order.objects.create(cart=cart)
> File 
> "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\manager.py"
>  
> in manager_method
>   127. return getattr(self.get_queryset(), name)(*args, 
> **kwargs)
> File 
> "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\query.py" 
> in create
>   348. obj.save(force_insert=True, using=self.db)
> File 
> "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\base.py" 
> in save
>   734.force_update=force_update, 
> update_fields=update_fields)
> File 
> "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\base.py" 
> in save_base
>   762. updated = self._save_table(raw, cls, forc

OperationalError at /checkout/ table orders_order has no column named order_id

2016-08-07 Thread M Hashmi
sar\dressikarepo\lib\site-packages\django\views\generic\base.py"
in dispatch
  89. return handler(request, *args, **kwargs)
File "C:\Users\Mudassar\dressikarepo\src\carts\views.py" in get
  188. get_data = super(CheckoutView, self).get(request, *args,
**kwargs)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\views\generic\detail.py"
in get
  116. context = self.get_context_data(object=self.object)
File "C:\Users\Mudassar\dressikarepo\src\carts\views.py" in get_context_data
  167. context["order"] = self.get_order()
File "C:\Users\Mudassar\dressikarepo\src\orders\mixins.py" in get_order
  22. new_order = Order.objects.create(cart=cart)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\manager.py"
in manager_method
  127. return getattr(self.get_queryset(), name)(*args,
**kwargs)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\query.py"
in create
  348. obj.save(force_insert=True, using=self.db)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\base.py"
in save
  734.force_update=force_update,
update_fields=update_fields)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\base.py"
in save_base
  762. updated = self._save_table(raw, cls, force_insert,
force_update, using, update_fields)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\base.py"
in _save_table
  846. result = self._do_insert(cls._base_manager, using,
fields, update_pk, raw)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\base.py"
in _do_insert
  885.using=using, raw=raw)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\manager.py"
in manager_method
  127. return getattr(self.get_queryset(), name)(*args,
**kwargs)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\query.py"
in _insert
  920. return query.get_compiler(using=using).execute_sql(return_id)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\models\sql\compiler.py"
in execute_sql
  974. cursor.execute(sql, params)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\backends\utils.py"
in execute
  79. return super(CursorDebugWrapper, self).execute(sql,
params)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\backends\utils.py"
in execute
  64. return self.cursor.execute(sql, params)
File "C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\utils.py"
in __exit__
  97. six.reraise(dj_exc_type, dj_exc_value, traceback)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\backends\utils.py"
in execute
  64. return self.cursor.execute(sql, params)
File
"C:\Users\Mudassar\dressikarepo\lib\site-packages\django\db\backends\sqlite3\base.py"
in execute
  318. return Database.Cursor.execute(self, query, params)

Exception Type: OperationalError at /checkout/
Exception Value: table orders_order has no column named order_id
...

*My migrations table for orders shows:*

class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('carts', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='Order',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False,
auto_created=True, primary_key=True)),
('status', models.CharField(default=b'created',
max_length=120, choices=[(b'created', b'Created'), (b'paid', b'Paid'),
(b'shipped', b'Shipped'), (b'refunded', b'Refunded')])),
('shipping_total_price', models.DecimalField(default=5.99,
max_digits=50, decimal_places=2)),
('order_total', models.DecimalField(max_digits=50,
decimal_places=2)),
('order_id', models.CharField(max_length=20, null=True,
blank=True)),
],
options={
'ordering': ['-id'],
},
),
migrations.CreateModel(
name='UserAddress',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False,
auto_created=True, primary_key=True)),
('type', models.CharField(max_length=120,
choices=[(b'billing', b'Billing'), (b'shipping', b'Shipping')])),

sqlite3 “OperationalError: no such table” on threaded operation

2016-01-08 Thread Jim Bell


By everything I read in the docs, both Django and py-sqlite3 should be fine 
with threaded access. (Right?) But the attached code snippet fails for me. 
The operations in the main thread work, but not in the thread(s) I create. 
There I get:

File 
"C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\db\backends\sq 
lite3\base.py", line 323, in execute return Database.Cursor.execute(self, 
query, params)

*OperationalError: no such table*: thrtest_mymodel

What's the problem?


How do I go about tracking down exactly what's happening? The point of 
failure in Django is pretty indimidating. I can't tell how to see what 
tables it DOES see, or what differences to look for between main and other 
threads.


Here is DATABASES from settings.py:

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:', # os.path.join(BASE_DIR, 'db.sqlite3'),
'TEST_NAME' : ':memory:',
},}


With respect to Django's ticket #12118, I get the same symptoms using 
':memory:' or a disk file (for TEST_NAME).


Django 1.9, Python 2.7.11.


Posted yesterday on stackoverflow 
<http://stackoverflow.com/questions/34658231/django-sqlite3-operationalerror-no-such-table-on-threaded-operation>
.

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9409d2f4-5530-4261-b501-c6833f39c735%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from django.db import models

# Super-simple model
class MyModel(models.Model):
   message   = models.CharField('Message', max_length=200, blank=True)

#Test
from django.test import TestCase

import time
import threading
import random


done = threading.Event()
nThreads = 1


def InsertRec(msg):
   rec = MyModel.objects.create(message=msg)
   rec.save()


def InsertThread():
   try:
  msgNum = 1
  thrName = threading.currentThread().name
  print 'Starting %s' % thrName
  while not done.wait(random.random() * 0.1):
 msgNum += 1
 msg = '%s: %d' % (thrName, msgNum)
 print msg
 InsertRec(msg)
   finally:
  done.set()
   pass


class ThreadTestRun(TestCase):

   def testRunIt(self):
  nThisThread = 10
  msgSet = set()
  for x in xrange(nThisThread):
 msg = 'Some message %d' % x
 InsertRec(msg) # From main thread: works!
 msgSet.add(msg)
  self.assertEqual(MyModel.objects.count(), nThisThread)
  # We use sets because .all() doesn't preserve the original order.
  self.assertEqual(msgSet, set([r.message for r in MyModel.objects.all()]))
  thrSet = set()
  for thrNum in xrange(nThreads):
 t = threading.Thread(name='Thread %d' % thrNum, target=InsertThread)
 t.start()
 thrSet.add(t)
  
  done.wait(10.)
  done.set()
  for t in thrSet:
 t.join()




Testcase raise "OperationalError: no such table" when there are some SystemCheckError

2015-09-22 Thread 朱涧江
class TicketReview(models.Model):
user = models.ForeignKey(User, null=True)
admin_user = models.ForeignKey(
User, #related_name="admin_user",#here is SystemCheckError
null=True) 


Maybe there can be some friendly error raise,rather than raise ` 
OperationalError: no such table`

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9989e878-f052-410d-8508-33858f8baee5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Server Deployment - OperationalError on shared hosting ASO

2015-04-22 Thread David F
Got it to work-- changed permissions of my shared part of the server using 
the bash:

chmod 755 .

thanks james for thinking through this with me

On Sunday, April 19, 2015 at 5:49:41 PM UTC-7, David F wrote:
>
> oh and yes-- I SSH into my part of the server that's how I'm able to do 
> all this :X the database file is in the project folder just... it's coming 
> up with that message when I try to open it in shell
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d9fb99fc-ce8d-4fe4-92aa-735ff13e4144%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Server Deployment - OperationalError on shared hosting ASO

2015-04-19 Thread David F
oh and yes-- I SSH into my part of the server that's how I'm able to do all 
this :X the database file is in the project folder just... it's coming up 
with that message when I try to open it in shell

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9a9c3814-5c85-494c-98ca-c84b8ce8cb8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Server Deployment - OperationalError on shared hosting ASO

2015-04-19 Thread David F
sqlite> .read db.sqlite3 
Error: incomplete SQL: SQLite format 3pp_label", 
"model")) �ite_autoindex_django_content_type_1django_content_type P   ++ 
Ytablesqlite_sequencesqlite_sequence CREATE 
TABLE 
sqlite_sequence(name,seq)�Y  // �atabledjango_migrationsdjango_migrations 
CREATE 
TABLE "django_migrations" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, 
"app" varchar(255) NOT NULL, "name" varchar(255) NOT NULLontenttypes000 add 
Blog Entry4add_entry  #Can add session add_session/)Can add 
permission add_tryadminlogentry

authuser authgroup! authpermission  adminlogentry 
add_tag)  delete_session)  change_session#  add_session1 
del   #  delete_user 1 change_contenttype   + add_contenttype
#  change_user
   add_user
   %  delete_group
   %  change_grou add_group   /  delete_permission/  change_permission  
 )  add_permission+  delete_logentry+  change_lodjango_migrations 
CREATE 
TABLE "django_migrations" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, 
"app" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "applied" 
datetime NOT NULL)P   ++ Ytablesqlite_sequencesqlite_sequence CREATE TABLE 
sqlite_sequence(name,seq)�   33 
�3tabledjango_content_typedjango_content_typeCREATE 
TABLE "django_content_type" ("id" integer NOT NULL PRIMARY KEY 
AUTOINCREMENT, "name" varchar(100) NOT NULL, "app_label" varchar(100) NOT 
NULL, "model" varchar(100) NOT NULL, UNIQUE ("app_label", 
"model"))E  Y3 th_permission_1auth_permission� !! �ktableauth_groupauth_group
CREATE TABLE "auth_group" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, 
"name" varchar(80) NOT NULL UNIQUE)3  G!  99 �
  
tableauth_group_permissionsauth_group_permissions
   CREATE TABLE "auth_group_permissions" ("id" integer NOT 
NULL PRIMARY KEY AUTOINCREMENT, "group_id" integer NOT NULL REFERENCES 
"auth_group" ("id"), "permission_id" integer NOT NULL REFERENCES 
"auth_permission" ("id"), UNIQUE ("group_id", "permission_id"))K
 _9 RY KEY AUTOINCREMENT, "password" 
varchar(128) NOT NULL, "last_login" datetime NOT NULL, "is_superuser" bool 
NOT NULL, "username" varchar(30) NOT NULL UNIQUE, "first_name" varchar(30) 
NOT NULL, "last_name" varchar(30) NOT NULL, "email" varchar(75) NOT NULL, 
"is_staff" bool NOT 
NUL  E  r_user_permissions_1auth_user_user_permissions �   =+ 
�)indexauth_permission_417f1b1cauth_permission CREATE 
INDEX auth_permission_417f1b1c ON "auth_permission" 
("content_type_id")�   K9 
�7indexauth_group_permissions_0e939a4fauth_group_permissions CREATE 
INDEX auth_group_permissions_0e939a4f ON "auth_group_permissions" 
("group_id")�   K9 �Aindexauth_group_permissions_8373b171auth_group_permissions 
CREATE 
INDEX auth_group_permissions_8373b171 ON "auth_group_permissions" 
("permission_id")~  ?- � indexauth_user_groups_e8701ad4auth_user_groups CREATE 
INDEX auth_user_groups_e8701ad4 ON "auth_user_groups" ("user_id")
   



uth_user_groups CREATE INDEX auth_user_groups_0e939a4f ON 
"auth_user_groups" 
("group_id")�&  SA 
�Eindexauth_user_user_permissions_e8701ad4auth_user_user_permissions CREATE 
INDEX auth_user_user_permissions_e8701ad4 ON "auth_user_user_permissions" 
("user_id")�,  SA 
�Qindexauth_user_user_permissions_8373b171auth_user_user_permissions CREATE 
INDEX auth_user_user_permissions_8373b171 ON "auth_user_user_permissions" 
("permission_id")�'  -- � tabledjango_admin_logdjango_admin_log CREATE 
TABLE "django_admin_log" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, 
"action_time" datetime NOT NULL, "object_id" text NULL, "object_repr" 
varchar(200) NOT NULL, "action_flag" smallint unsigned NOT NULL, 
"change_message" text NOT NULL, "content_type_id" integer NULL REFERENCES 
"django_content_type" ("id"), "user_id" integer NOT NULL REFERENCES 
"auth_user" ("id"))
f1b1cdjango_admin_log CREATE INDEX django_admin_log_417f1b1c ON 
"django_admin_log" 
("content_type_id")~  ?- � 
indexdjango_admin_log_e8701ad4django_admin_log!CREATE 
INDEX django_admin_log_e8701ad4 ON "django_admin_log" 
("user_id")�   !! � tableblog_entryblog_entry"CREATE TABLE "blog_entry" 
("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "title" varchar(200) NOT 
NULL, "body" text NOT NULL, "slug" varchar(200) NOT NULL UNIQUE, "publish" 
bool NOT NULL, "created" datetime NOT NULL, "modified" datetime NOT 
NULL)3   G! , "ip_address" char(15) NOT NULL, "user_data" varchar(255) NOT 
NULL)�
  �itableblog_tagblog_tag%CREATE TABLE 
"blog_tag" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "slug" 
varchar(200) NOT NULL UNIQUE)/   C   ON "blog_entry_tags" 
("entry_id")y$ =+ � indexblog_entry_tags_76f094bcblog_entry_tags+CREATE 
INDEX blog_entry_tags_76f094bc ON "blog_entry_tags" 
("tag_id")�6% )) �'tabledjango_ses

Re: Django Server Deployment - OperationalError on shared hosting ASO

2015-04-19 Thread James Schneider
No need to switch databases.

Do you have any shell access to the server? Can you manually inspect the
database to see if the table actually exists (outside of any Django
commands)? I'm not sure what ASO offers.

-James
On Apr 19, 2015 9:19 AM, "David F"  wrote:

> Or I'm using sqlite should I switch to mysql?
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/89b0e022-7f83-4ceb-991f-dcbca49ce78d%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXhjqwWLtwQL_AWxtWgdj%2BpW8sebR-MiwwrikwYe3a1Wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Server Deployment - OperationalError on shared hosting ASO

2015-04-19 Thread David F
Or I'm using sqlite should I switch to mysql?

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/89b0e022-7f83-4ceb-991f-dcbca49ce78d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Server Deployment - OperationalError on shared hosting ASO

2015-04-19 Thread David F

Hey James

Sorry I forgot to mention that I did run first ./manage.py syncdb to create 
a superuser for the database and the admin, and have run makemigrations and 
migrate several times throughout editing my models, still to no avail. I 
did it again after seeing your post just to be sure :p same error :/

Do you think it would help to just delete the database and recreate it 
would work or n...?

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/179e85a3-fb30-479d-8180-c58bb5324537%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Server Deployment - OperationalError on shared hosting ASO

2015-04-18 Thread James Schneider
You don't mention running 'manage.py makemigrations' or 'manage.py migrate'
in any of your output. The error you are getting indicates that Django has
access to a database, but the table schema is incorrect. If you haven't
previously run migrate, then you have no tables, which explains the error
you are getting.

-James
On Apr 18, 2015 10:30 AM, "David F"  wrote:

> Hi guys!! Great to be a part of the community.
>
> So as the title says, I am deploying a site I made locally to a shared
> hosting server through "A Small Orange" or ASO. My site structure is as
> follows:
>
> don't judge my naming structure :p (unless it actually is messing
> something up)
>
> /home/my_username:
> -.env
> - public_html:
> - .htaccess
> - dispatch.fcgi
> -  blog:
> -  mysite:
> -  templates:
> - mysite.com
> - media
> - static
> - templates
> - my_site:
> - db.sqlite3
> - manage.py
> - blog:
> - __init__.py
> - feed.py
> - models.py
> - admin.py
> - views.py
> - urls.py
> - my_site:
> - __init__.py
> - email_info.py
> - settings.py
> - urls.py
> - wsgi.py
>
>
>
> I've installed django and all relevant stuff like installed apps in a
> vrtualenv. Here's the .htaccess file:
>
> ErrorDocument 500 "Server error. Sorry."
>
> AddHandler fcgid-script .fcgi
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L]
>
>
> And the dispatch.fcgi:
>
> #!/home/jeheyvyc/.env/env/bin/python
>
> import sys
> import os
>
> sys.path.insert(0,
> '/home/my_username/.env/env/lib/python2.7/site-packages')
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'my_site.settings'
>
> from django.core.servers.fastcgi import runfastcgi
> runfastcgi(method="threaded", daemonize="false")
>
>
> And my settings.py
>
> import os
> BASE_DIR = os.path.dirname(os.path.dirname(__file__))
>
> from .email_info import *
>
> EMAIL_USE_TLS = EMAIL_USE_TLS
> EMAIL_HOST = EMAIL_HOST
> EMAIL_HOST_USER = EMAIL_HOST_USER
> EMAIL_HOST_PASSWORD = EMAIL_HOST_PASSWORD
> EMAIL_PORT = EMAIL_PORT
>
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = SECRET_KEY
>
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
>
> TEMPLATE_DEBUG = True
>
> ALLOWED_HOSTS = [
>
> 'mysite.com',
>
> ]
>
> ADMIN = (
>
> ('My_admin', ''),
>
> )
>
>
> # Application definition
>
> INSTALLED_APPS = (
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'blog',
> 'dj_static',
> 'django_markdown',
> )
>
> MIDDLEWARE_CLASSES = (
>
>
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> )
>
> ROOT_URLCONF = 'my_site.urls'
>
> WSGI_APPLICATION = 'my_site.wsgi.application'
>
>
> # Database
> # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
> }
> }
>
> # Internationalization
> # https://docs.djangoproject.com/en/1.7/topics/i18n/
>
> LANGUAGE_CODE = 'en-us'
>
> TIME_ZONE = 'UTC'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = True
>
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/1.7/howto/static-files/
>
> STATIC_ROOT = 'staticfiles'
>
> STATIC_URL = '/static/'
>
> STATICFILES_DIRS = (
> '/home/my_username/mysite.com/static/',
>
> '/home/my_username/.env/env/lib/python2.7/site-packages/django/contrib/a

Django Server Deployment - OperationalError on shared hosting ASO

2015-04-18 Thread David F
Hi guys!! Great to be a part of the community.

So as the title says, I am deploying a site I made locally to a shared 
hosting server through "A Small Orange" or ASO. My site structure is as 
follows:

don't judge my naming structure :p (unless it actually is messing something 
up)

/home/my_username:
-.env
- public_html:
- .htaccess
- dispatch.fcgi
-  blog:
-  mysite:
-  templates:
- mysite.com
- media
- static
- templates
- my_site:
- db.sqlite3
- manage.py
- blog:
- __init__.py
- feed.py
- models.py
- admin.py
- views.py
- urls.py
- my_site:
- __init__.py
- email_info.py
- settings.py
- urls.py
- wsgi.py



I've installed django and all relevant stuff like installed apps in a 
vrtualenv. Here's the .htaccess file:

ErrorDocument 500 "Server error. Sorry."

AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L]


And the dispatch.fcgi:

#!/home/jeheyvyc/.env/env/bin/python

import sys
import os

sys.path.insert(0, '/home/my_username/.env/env/lib/python2.7/site-packages')

os.environ['DJANGO_SETTINGS_MODULE'] = 'my_site.settings'

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")


And my settings.py

import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))

from .email_info import *

EMAIL_USE_TLS = EMAIL_USE_TLS
EMAIL_HOST = EMAIL_HOST
EMAIL_HOST_USER = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = EMAIL_HOST_PASSWORD
EMAIL_PORT = EMAIL_PORT

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = SECRET_KEY

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = [

'mysite.com',

]

ADMIN = (

('My_admin', ''),

)


# Application definition

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
'dj_static',
'django_markdown',
)

MIDDLEWARE_CLASSES = (


'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'my_site.urls'

WSGI_APPLICATION = 'my_site.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/

STATIC_ROOT = 'staticfiles'

STATIC_URL = '/static/'

STATICFILES_DIRS = (
'/home/my_username/mysite.com/static/',

'/home/my_username/.env/env/lib/python2.7/site-packages/django/contrib/admin/static/',

)

TEMPLATE_DIRS = (

'/home/my_username/mysite.com/templates/',
 )



And so when I access the site I am greeted with this:


OperationalError at / 

no such table: blog_entry

 Request Method: GET  Request URL: http://mysite.com/  Django Version: 1.7  
Exception 
Type: OperationalError  Exception Value: 

no such table: blog_entry

 Exception Location: 
/home/my_username/.env/env/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py
 
in execute, line 485  Python Executable: 
/home/my_username/.env/env/bin/python  Python Version: 2.7.8  Python Path: 

['/home/my_username/mysite.com/my_site',
 '/home/my_username/.env/env/lib/python2.7/site-packages',
 '/home/my_username/public_html',
 '/home/my_username/.env/env/lib/python27.zip',
 '/home/my_username/.env/env/lib/python2.7',
 '/home/my_username/.env/env/lib/python2.7/plat-linux2',
 '/home/my_username/.env/env/lib/python2.7/lib-tk',
 '/home/my_username/.env/env/lib/python2.7/lib-old',
 '/home/my_username/.env/env/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.

Re: Django OperationalError

2015-03-15 Thread Petar Pilipovic
context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
> in render
> >>>>>>>   844. bit = self.render_node(node, context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/debug.py"
> in render_node
> >>>>>>>   80. return node.render(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/loader_tags.py"
> in render
> >>>>>>>   126. return compiled_parent._render(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
> in _render
> >>>>>>>   142. return self.nodelist.render(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
> in render
> >>>>>>>   844. bit = self.render_node(node, context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/debug.py"
> in render_node
> >>>>>>>   80. return node.render(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/loader_tags.py"
> in render
> >>>>>>>   65. result = block.nodelist.render(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
> in render
> >>>>>>>   844. bit = self.render_node(node, context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/debug.py"
> in render_node
> >>>>>>>   80. return node.render(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/defaulttags.py"
> in render
> >>>>>>>   305. match = condition.eval(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/defaulttags.py"
> in eval
> >>>>>>>   898. return self.value.resolve(context,
> ignore_failures=True)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
> in resolve
> >>>>>>>   596. obj = self.var.resolve(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
> in resolve
> >>>>>>>   734. value = self._resolve_lookup(context)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
> in _resolve_lookup
> >>>>>>>   764. current = current[bit]
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/utils/functional.py"
> in inner
> >>>>>>>   224. self._setup()
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/utils/functional.py"
> in _setup
> >>>>>>>   357. self._wrapped = self._setupfunc()
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/auth/middleware.py"
> in 
> >>>>>>>   22. request.user = SimpleLazyObject(lambda:
> get_user(request))
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/auth/middleware.py"
> in get_user
> >>>>>>>   10. request._cached_user = auth.get_user(request)
> >>>>>>> File
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py"
> in get_user
> >>>>>>>   152. user_id = request.session[SESSION_KEY]
> >>>>>>> File
> "/home/copser/.virtualenv

Re: Django OperationalError

2015-03-12 Thread luis zarate
44 :  {% csrf_token %}
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>45 : 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>46 : Login*

>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>47 : Password* 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>48 : Remember Me
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>49 : 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>50 : 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Traceback:
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/core/handlers/base.py"
in get_response
>>>>>>>   111. response = wrapped_callback(request,
*callback_args, **callback_kwargs)
>>>>>>> File "/home/copser/mineDjango/profiles/views.py" in home
>>>>>>>   7. return render(request, template, context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/shortcuts.py"
in render
>>>>>>>   48. return HttpResponse(loader.render_to_string(*args,
**kwargs),
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/loader.py"
in render_to_string
>>>>>>>   174. return t.render(context_instance)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
in render
>>>>>>>   148. return self._render(context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
in _render
>>>>>>>   142. return self.nodelist.render(context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
in render
>>>>>>>   844. bit = self.render_node(node, context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/debug.py"
in render_node
>>>>>>>   80. return node.render(context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/loader_tags.py"
in render
>>>>>>>   126. return compiled_parent._render(context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
in _render
>>>>>>>   142. return self.nodelist.render(context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
in render
>>>>>>>   844. bit = self.render_node(node, context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/debug.py"
in render_node
>>>>>>>   80. return node.render(context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/loader_tags.py"
in render
>>>>>>>   65. result = block.nodelist.render(context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/base.py"
in render
>>>>>>>   844. bit = self.render_node(node, context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/debug.py"
in render_node
>>>>>>>   80. return node.render(context)
>>>>>>> File
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/template/defaulttags.py"
in render
>>>>>>>   305. match = condition.eval

Re: Django OperationalError

2015-03-12 Thread Collin Anderson
python2.7/site
>>>>>> -packages/django/template/debug.py" in render_node
>>>>>>   80. return node.render(context)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/template/loader_tags.py" in render
>>>>>>   65. result = block.nodelist.render(context)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/template/base.py" in render
>>>>>>   844. bit = self.render_node(node, context)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/template/debug.py" in render_node
>>>>>>   80. return node.render(context)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/template/defaulttags.py" in render
>>>>>>   305. match = condition.eval(context)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/template/defaulttags.py" in eval
>>>>>>   898. return self.value.resolve(context, 
>>>>>> ignore_failures=True)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/template/base.py" in resolve
>>>>>>   596. obj = self.var.resolve(context)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/template/base.py" in resolve
>>>>>>   734. value = self._resolve_lookup(context)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/template/base.py" in _resolve_lookup
>>>>>>   764. current = current[bit]
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/utils/functional.py" in inner
>>>>>>   224. self._setup()
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/utils/functional.py" in _setup
>>>>>>   357. self._wrapped = self._setupfunc()
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/contrib/auth/middleware.py" in 
>>>>>>   22. request.user = SimpleLazyObject(lambda: 
>>>>>> get_user(request))
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/contrib/auth/middleware.py" in get_user
>>>>>>   10. request._cached_user = auth.get_user(request)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/contrib/auth/__init__.py" in get_user
>>>>>>   152. user_id = request.session[SESSION_KEY]
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/contrib/sessions/backends/base.py" in __getitem__
>>>>>>   49. return self._session[key]
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/contrib/sessions/backends/base.py" in _get_session
>>>>>>   175. self._session_cache = self.load()
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/contrib/sessions/backends/db.py" in load
>>>>>>   21. expire_date__gt=timezone.now()
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/db/models/manager.py" in manager_method
>>>>>>   92. return getattr(self.get_queryset(), 
>>>>>> name)(*args, **kwargs)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>>> -packages/django/db/models/query.py" in get
>>>>>>   351. num = len(clone)
>>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>

Re: Django OperationalError

2015-03-12 Thread Petar Pilipovic
  174. return t.render(context_instance)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in render
>>>>   148. return self._render(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in _render
>>>>   142. return self.nodelist.render(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in render
>>>>   844. bit = self.render_node(node, context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/debug.py" in render_node
>>>>   80. return node.render(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/loader_tags.py" in render
>>>>   126. return compiled_parent._render(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in _render
>>>>   142. return self.nodelist.render(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in render
>>>>   844. bit = self.render_node(node, context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/debug.py" in render_node
>>>>   80. return node.render(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/loader_tags.py" in render
>>>>   65. result = block.nodelist.render(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in render
>>>>   844. bit = self.render_node(node, context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/debug.py" in render_node
>>>>   80. return node.render(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/defaulttags.py" in render
>>>>   305. match = condition.eval(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/defaulttags.py" in eval
>>>>   898. return self.value.resolve(context, ignore_failures=True)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in resolve
>>>>   596. obj = self.var.resolve(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in resolve
>>>>   734. value = self._resolve_lookup(context)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/template/base.py" in _resolve_lookup
>>>>   764. current = current[bit]
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/utils/functional.py" in inner
>>>>   224. self._setup()
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/utils/functional.py" in _setup
>>>>   357. self._wrapped = self._setupfunc()
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/contrib/auth/middleware.py" in 
>>>>   22. request.user = SimpleLazyObject(lambda: get_user(request))
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/contrib/auth/middleware.py" in get_user
>>>>   10. request._cached_user = auth.get_user(request)
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>> -packages/django/contrib/auth/__init__.py" in get_user
>>>>   152. user_id = request.session[SESSION_KEY]
>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>

Re: Django OperationalError

2015-03-10 Thread Petar Pilipovic
quot; class="">>>>> id="id_remember" name="remember" type="checkbox">
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>48 : Remember Me
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>49 : 
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>50 : 
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Traceback:
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/core/handlers/base.py" in get_response
>>>>>   111. response = wrapped_callback(request,
>>>>> *callback_args, **callback_kwargs)
>>>>> File "/home/copser/mineDjango/profiles/views.py" in home
>>>>>   7. return render(request, template, context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/shortcuts.py" in render
>>>>>   48. return HttpResponse(loader.render_to_string(*args,
>>>>> **kwargs),
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/loader.py" in render_to_string
>>>>>   174. return t.render(context_instance)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/base.py" in render
>>>>>   148. return self._render(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/base.py" in _render
>>>>>   142. return self.nodelist.render(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/base.py" in render
>>>>>   844. bit = self.render_node(node, context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/debug.py" in render_node
>>>>>   80. return node.render(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/loader_tags.py" in render
>>>>>   126. return compiled_parent._render(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/base.py" in _render
>>>>>   142. return self.nodelist.render(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/base.py" in render
>>>>>   844. bit = self.render_node(node, context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/debug.py" in render_node
>>>>>   80. return node.render(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/loader_tags.py" in render
>>>>>   65. result = block.nodelist.render(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/base.py" in render
>>>>>   844. bit = self.render_node(node, context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/debug.py" in render_node
>>>>>   80. return node.render(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/defaulttags.py" in render
>>>>>   305. match = condition.eval(context)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/defaulttags.py" in eval
>>>>>   898. return self.value.resolve(context, ignore_failures=True)
>>>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/site
>>>>> -packages/django/template/base.py" in resolve
>>>>>   596. 

Re: Django OperationalError

2015-03-10 Thread Collin Anderson
/loader_tags.py" in render
>>>   126. return compiled_parent._render(context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/base.py" in _render
>>>   142. return self.nodelist.render(context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/base.py" in render
>>>   844. bit = self.render_node(node, context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/debug.py" in render_node
>>>   80. return node.render(context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/loader_tags.py" in render
>>>   65. result = block.nodelist.render(context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/base.py" in render
>>>   844. bit = self.render_node(node, context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/debug.py" in render_node
>>>   80. return node.render(context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/defaulttags.py" in render
>>>   305. match = condition.eval(context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/defaulttags.py" in eval
>>>   898. return self.value.resolve(context, ignore_failures=True)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/base.py" in resolve
>>>   596. obj = self.var.resolve(context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/base.py" in resolve
>>>   734. value = self._resolve_lookup(context)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/template/base.py" in _resolve_lookup
>>>   764. current = current[bit]
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/utils/functional.py" in inner
>>>   224. self._setup()
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/utils/functional.py" in _setup
>>>   357. self._wrapped = self._setupfunc()
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/contrib/auth/middleware.py" in 
>>>   22. request.user = SimpleLazyObject(lambda: get_user(request))
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/contrib/auth/middleware.py" in get_user
>>>   10. request._cached_user = auth.get_user(request)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/contrib/auth/__init__.py" in get_user
>>>   152. user_id = request.session[SESSION_KEY]
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/contrib/sessions/backends/base.py" in __getitem__
>>>   49. return self._session[key]
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/contrib/sessions/backends/base.py" in _get_session
>>>   175. self._session_cache = self.load()
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/contrib/sessions/backends/db.py" in load
>>>   21. expire_date__gt=timezone.now()
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/db/models/manager.py" in manager_method
>>>   92. return getattr(self.get_queryset(), name)(*args, 
>>> **kwargs)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/db/models/query.py" in get
>>>   351. num = len(clone)
>>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>>> site-packages/django/db/models/query.py" in __len__
>>>   122. self._fetch_all()
>>> File "/home/copser

Re: Django OperationalError

2015-03-06 Thread Petar Pilipovic
>> site-packages/django/template/defaulttags.py" in render
>>   305. match = condition.eval(context)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/template/defaulttags.py" in eval
>>   898. return self.value.resolve(context, ignore_failures=True)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/template/base.py" in resolve
>>   596. obj = self.var.resolve(context)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/template/base.py" in resolve
>>   734. value = self._resolve_lookup(context)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/template/base.py" in _resolve_lookup
>>   764. current = current[bit]
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/utils/functional.py" in inner
>>   224. self._setup()
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/utils/functional.py" in _setup
>>   357. self._wrapped = self._setupfunc()
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/contrib/auth/middleware.py" in 
>>   22. request.user = SimpleLazyObject(lambda: get_user(request))
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/contrib/auth/middleware.py" in get_user
>>   10. request._cached_user = auth.get_user(request)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/contrib/auth/__init__.py" in get_user
>>   152. user_id = request.session[SESSION_KEY]
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/contrib/sessions/backends/base.py" in __getitem__
>>   49. return self._session[key]
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/contrib/sessions/backends/base.py" in _get_session
>>   175. self._session_cache = self.load()
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/contrib/sessions/backends/db.py" in load
>>   21. expire_date__gt=timezone.now()
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/models/manager.py" in manager_method
>>   92. return getattr(self.get_queryset(), name)(*args,
>> **kwargs)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/models/query.py" in get
>>   351. num = len(clone)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/models/query.py" in __len__
>>   122. self._fetch_all()
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/models/query.py" in _fetch_all
>>   966. self._result_cache = list(self.iterator())
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/models/query.py" in iterator
>>   265. for row in compiler.results_iter():
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/models/sql/compiler.py" in results_iter
>>   700. for rows in self.execute_sql(MULTI):
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/models/sql/compiler.py" in execute_sql
>>   786. cursor.execute(sql, params)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/backends/utils.py" in execute
>>   81. return super(CursorDebugWrapper, self).execute(sql,
>> params)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/backends/utils.py" in execute
>>   65. return self.cursor.execute(sql, params)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/utils.py" in __exit__
>>   94. six.reraise(dj_exc_type, dj_exc_value, traceback)
>> File "/home/copser/.virtualenvs/django17/local/lib/python2.7/
>> site-packages/django/db/backends/utils.py" in execute
>>   65. return self.cursor.e

Re: Django OperationalError

2015-03-06 Thread Collin Anderson
.py"
>  
> in inner
>   224. self._setup()
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/utils/functional.py"
>  
> in _setup
>   357. self._wrapped = self._setupfunc()
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/auth/middleware.py"
>  
> in 
>   22. request.user = SimpleLazyObject(lambda: get_user(request))
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/auth/middleware.py"
>  
> in get_user
>   10. request._cached_user = auth.get_user(request)
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py"
>  
> in get_user
>   152. user_id = request.session[SESSION_KEY]
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py"
>  
> in __getitem__
>   49. return self._session[key]
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py"
>  
> in _get_session
>   175. self._session_cache = self.load()
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py"
>  
> in load
>   21. expire_date__gt=timezone.now()
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/models/manager.py"
>  
> in manager_method
>   92. return getattr(self.get_queryset(), name)(*args, 
> **kwargs)
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/models/query.py"
>  
> in get
>   351. num = len(clone)
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/models/query.py"
>  
> in __len__
>   122. self._fetch_all()
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/models/query.py"
>  
> in _fetch_all
>   966. self._result_cache = list(self.iterator())
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/models/query.py"
>  
> in iterator
>   265. for row in compiler.results_iter():
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py"
>  
> in results_iter
>   700. for rows in self.execute_sql(MULTI):
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py"
>  
> in execute_sql
>   786. cursor.execute(sql, params)
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/backends/utils.py"
>  
> in execute
>   81. return super(CursorDebugWrapper, self).execute(sql, 
> params)
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/backends/utils.py"
>  
> in execute
>   65. return self.cursor.execute(sql, params)
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/utils.py"
>  
> in __exit__
>   94. six.reraise(dj_exc_type, dj_exc_value, traceback)
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/backends/utils.py"
>  
> in execute
>   65. return self.cursor.execute(sql, params)
> File 
> "/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py"
>  
> in execute
>   485. return Database.Cursor.execute(self, query, params)
>
>
> Exception Type: OperationalError at /
> Exception Value: no such table: django_session
> Mine question is can you tell why is this happening, and why is there an 
> error on line 40 in mine home.html page.
> Is it maybe because I am using Sql3 insted of postgresql?
> Tank you
> Best
> Petar
> On Saturday, 28 February 2015 07:59:50 UTC+1, Petar Pilipovic wrote:
>>
>> Hello James, will do but I am not at mine lap top atm, gona do it as soon 
>> as posible, tank you very much.
>>
>> On Saturday, February 28, 2015, James Schneider > > wrote:
>> > Generally this happens when you don't apply the initial migration. Have 
>> you run 'python manage.py migrate' (assuming Django >= 1.7 since you 
>> mentioned making migrations) and if you have,

Re: Django OperationalError

2015-03-02 Thread Petar Pilipovic
TI):
File 
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py"
 
in execute_sql
  786. cursor.execute(sql, params)
File 
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/backends/utils.py"
 
in execute
  81. return super(CursorDebugWrapper, self).execute(sql, 
params)
File 
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/backends/utils.py"
 
in execute
  65. return self.cursor.execute(sql, params)
File 
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/utils.py"
 
in __exit__
  94. six.reraise(dj_exc_type, dj_exc_value, traceback)
File 
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/backends/utils.py"
 
in execute
  65. return self.cursor.execute(sql, params)
File 
"/home/copser/.virtualenvs/django17/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py"
 
in execute
  485. return Database.Cursor.execute(self, query, params)


Exception Type: OperationalError at /
Exception Value: no such table: django_session
Mine question is can you tell why is this happening, and why is there an 
error on line 40 in mine home.html page.
Is it maybe because I am using Sql3 insted of postgresql?
Tank you
Best
Petar
On Saturday, 28 February 2015 07:59:50 UTC+1, Petar Pilipovic wrote:
>
> Hello James, will do but I am not at mine lap top atm, gona do it as soon 
> as posible, tank you very much.
>
> On Saturday, February 28, 2015, James Schneider  
> wrote:
> > Generally this happens when you don't apply the initial migration. Have 
> you run 'python manage.py migrate' (assuming Django >= 1.7 since you 
> mentioned making migrations) and if you have, what was the output? If you 
> aren't sure, run it again as it shouldn't hurt anything.
> >
> > Check your database and make sure that the tables actually exist. If 
> not, and there is no production data (assuming not based on the question), 
> drop and recreate the DB to clear out any previously failed migration 
> attempts and apply your migrations again using the command I specified. 
> Capture the entire output of the command and paste it back to this list so 
> that we can help more.
> >
> > -James
> >
> > On Feb 27, 2015 10:02 PM, "Petar Pilipovic"  wrote:
> >>
> >> Hello, I have manage to merge mine application to pythonanywhere.com. 
> After I have done all the needed installing, uploading files, collecting 
> static, making migrations to mine django application, I have experienced an 
> OperationError saying:
> >>
> >> no such table: django_session
> >> You can find the rest of mine question here on stackoverflow, Can 
> someone help me over come this error, tank 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 django-users@googlegroups.com.
> >> Visit this group at http://groups.google.com/group/django-users.
> >> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/01f5c13c-5b7e-40ea-b98b-e37640e477df%40googlegroups.com
> .
> >> For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to a topic in the 
> Google Groups "Django users" group.
> > To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/django-users/MOsaEEDNyQg/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to 
> django-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@googlegroups.com.
> > Visit this group at http://groups.google.com/group/django-users.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXfPuqKgQz89CVgaB07cf_Lwj%3DK-XcdtV9GK1EZ%3DQxMaQ%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> > 

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53c159e0-864d-4de4-b3fc-8f111bffbeae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django OperationalError

2015-02-27 Thread Petar Pilipovic
Hello James, will do but I am not at mine lap top atm, gona do it as soon
as posible, tank you very much.

On Saturday, February 28, 2015, James Schneider 
wrote:
> Generally this happens when you don't apply the initial migration. Have
you run 'python manage.py migrate' (assuming Django >= 1.7 since you
mentioned making migrations) and if you have, what was the output? If you
aren't sure, run it again as it shouldn't hurt anything.
>
> Check your database and make sure that the tables actually exist. If not,
and there is no production data (assuming not based on the question), drop
and recreate the DB to clear out any previously failed migration attempts
and apply your migrations again using the command I specified. Capture the
entire output of the command and paste it back to this list so that we can
help more.
>
> -James
>
> On Feb 27, 2015 10:02 PM, "Petar Pilipovic"  wrote:
>>
>> Hello, I have manage to merge mine application to pythonanywhere.com.
After I have done all the needed installing, uploading files, collecting
static, making migrations to mine django application, I have experienced an
OperationError saying:
>>
>> no such table: django_session
>> You can find the rest of mine question here on stackoverflow, Can
someone help me over come this error, tank 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 django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/01f5c13c-5b7e-40ea-b98b-e37640e477df%40googlegroups.com
.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
Google Groups "Django users" group.
> To unsubscribe from this topic, visit
https://groups.google.com/d/topic/django-users/MOsaEEDNyQg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXfPuqKgQz89CVgaB07cf_Lwj%3DK-XcdtV9GK1EZ%3DQxMaQ%40mail.gmail.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK8niQsiLMaeLE%3D_8phdGhKqsYXuuL3nwStTJwXJQ%3D%2BrVuNYLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django OperationalError

2015-02-27 Thread James Schneider
Generally this happens when you don't apply the initial migration. Have you
run 'python manage.py migrate' (assuming Django >= 1.7 since you mentioned
making migrations) and if you have, what was the output? If you aren't
sure, run it again as it shouldn't hurt anything.

Check your database and make sure that the tables actually exist. If not,
and there is no production data (assuming not based on the question), drop
and recreate the DB to clear out any previously failed migration attempts
and apply your migrations again using the command I specified. Capture the
entire output of the command and paste it back to this list so that we can
help more.

-James
On Feb 27, 2015 10:02 PM, "Petar Pilipovic"  wrote:

> Hello, I have manage to merge mine application to pythonanywhere.com.
> After I have done all the needed installing, uploading files, collecting
> static, making migrations to mine django application, I have experienced an
> OperationError saying:
> no such table: django_session
>
> You can find the rest of mine question here on stackoverflow
> <http://stackoverflow.com/questions/28778126/django-operationalerror>,
> Can someone help me over come this error, tank 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 django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/01f5c13c-5b7e-40ea-b98b-e37640e477df%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/01f5c13c-5b7e-40ea-b98b-e37640e477df%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXfPuqKgQz89CVgaB07cf_Lwj%3DK-XcdtV9GK1EZ%3DQxMaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django OperationalError

2015-02-27 Thread Petar Pilipovic


Hello, I have manage to merge mine application to pythonanywhere.com. After 
I have done all the needed installing, uploading files, collecting static, 
making migrations to mine django application, I have experienced an 
OperationError saying:
no such table: django_session

You can find the rest of mine question here on stackoverflow 
<http://stackoverflow.com/questions/28778126/django-operationalerror>, Can 
someone help me over come this error, tank 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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/01f5c13c-5b7e-40ea-b98b-e37640e477df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-25 Thread Andreas Kuhne
 connection
>>>>>> parameters are correct, so it should work?
>>>>>>
>>>>>> Sorry I don't know what to do to help you more.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Andréas
>>>>>>
>>>>>> 2015-02-24 12:49 GMT+01:00 :
>>>>>>
>>>>>>> Hi Andreas,
>>>>>>>
>>>>>>> I can connect using "python manage.py dbshell" it connects without
>>>>>>> any error.
>>>>>>>
>>>>>>> Is there a difference, if i am not mistaken the dbshell test shows
>>>>>>> that the configuration of the DB is correct and that i can connect from 
>>>>>>> the
>>>>>>> machine, correct ?? From the stack trace it seems that the real issue is
>>>>>>> not returned and the only thing i get is the "NOT CONNECTED TO ORACLE" 
>>>>>>> error
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Alex
>>>>>>>
>>>>>>> On Friday, February 20, 2015 at 7:12:05 PM UTC+2, Andréas Kühne
>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> 2015-02-20 17:18 GMT+01:00 :
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I migrated my project to a new infrastructure but i kept the same
>>>>>>>>> versions Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1
>>>>>>>>>
>>>>>>>>> I am trying to run my project and i am getting the below exception
>>>>>>>>> that seems to be from Django and i need help pin pointing the exact 
>>>>>>>>> cause,
>>>>>>>>> because i think that the actual exception is never caught and 
>>>>>>>>> returned to
>>>>>>>>> the log and all i am getting is the OperationalError: ORA-03114: not
>>>>>>>>> connected to ORACLE. I checked the Oracle DB and i can connect to it.
>>>>>>>>>
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi
>>>>>>>>> (pid=27565): Exception occurred processing WSGI script
>>>>>>>>> '/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback
>>>>>>>>> (most recent call last):
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>>>>>> "/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line
>>>>>>>>> 50, in __call__
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] return
>>>>>>>>> self.__application(environ, _start_response)
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>>>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
>>>>>>>>> line 248, in __call__
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>>>>>>>> signals.request_finished.send(sender=self.__class__)
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>>>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/d
>>>>>>>>> ispatch/dispatcher.py", line 162, in send
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>>>>>>>> response = receiver(signal=self, sender=sender, **named)
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>>>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/db/__init__.py",
>>>>>>>>> line 82, in close_connection
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>>>>>>>> conn.close()
>>>>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>>>>>> "/opt/webt

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-25 Thread alexandrosstylianou88
Hi Andreas, 

I did the following test... i used "python manage.py runserver" and i was 
able to use the admin page (http://127.0.0.1:8000/admin/) of Django and log 
into the DB.  

So that means the apache and the mod_wsgi as you said have a problem, 
correct ??? 

Regars,
Alex

On Tuesday, February 24, 2015 at 6:05:14 PM UTC+2, Andréas Kühne wrote:
>
> The file you wrote connects to the database itself, it doesn't use djangos 
> connection, so the only thing you are testing is if you can connect to the 
> database. And that we know (because you are able to do it with ./manage.py 
> dbshell). What you need to check is if the settings.py file used by django 
> is correctly interpreted by mod_wsgi. 
>
> Because you are bepassing all of that, your test file will work and just 
> connects to the database.
>
> As I said earlier, make sure that your mod_wsgi is configured correctly 
> and that it can read your settings file.
>
> Regards,
>
> Andréas
>
> 2015-02-24 16:19 GMT+01:00 >:
>
>> Well i have created the below test script to check if i am able to 
>> connect to the DB using mod_wsgi and i get back the sysdate from the DB.. I 
>> have configured mod_wsgi under the alias /test to execute the below script 
>> and i always get the time..  So it seems that the configuration in mod_wsgi 
>> is correct 
>> 
>> import os,sys
>>
>> import cx_Oracle
>>
>>
>> con = cx_Oracle.connect("username/password@DB")
>> print('DATABASE VERSION: ' + con.version)
>> print ''
>>
>> time= con.cursor()
>> time.execute("SELECT TO_CHAR (SYSDATE, 'MM-DD- HH24:MI:SS') FROM 
>> DUAL")
>>
>> for t in time:
>> print t
>>
>> con.close()
>>
>> def application(environ, start_response):
>> status = '200 OK'
>> output = 'Hello World! \r\r'
>> output += str(t)
>> #print sys.stderr
>>
>> response_headers = [('Content-type', 'text/plain'),
>> ('Content-Length', str(len(output)))]
>>
>> start_response(status, response_headers)
>>
>> return [output]
>>
>>
>> -
>>
>>
>> On Tuesday, February 24, 2015 at 4:21:01 PM UTC+2, Andréas Kühne wrote:
>>>
>>> Hmmm
>>>
>>> You can use ./manage.py dbshell, so your configuration is correct in 
>>> THAT case, however, have you set all the variables correctly for django 
>>> when running apache + mod_wsgi? Has the connection ever worked there?
>>>
>>> What do the config files for mod_wsgi look like and are all of the paths 
>>> correctly set in the mod_wsgi script?
>>>
>>> I'm just guessing now, but I think that the problem is your mod_wsgi 
>>> setup.
>>>
>>> Regards,
>>>
>>> Andréas 
>>>
>>> 2015-02-24 14:17 GMT+01:00 :
>>>
>>>> Is there any way to find out where the problem occurs ?? Is there a way 
>>>> to enable some debugging or trace in order to see which python scripts are 
>>>> called in Django and find out where the whole process is failing ?? 
>>>>
>>>> In the last lines of the stack trace it tries to close the connection 
>>>> and for some reason it fails... is it because the connection was never 
>>>> created ?? or it was closed before the application was ready to send 
>>>> data.. 
>>>> ??? 
>>>>
>>>> Can anyone help  
>>>>
>>>> On Tuesday, February 24, 2015 at 2:08:53 PM UTC+2, Andréas Kühne wrote:
>>>>>
>>>>> The reason I asked this is because that means that your connection 
>>>>> parameters are correct, so it should work?
>>>>>
>>>>> Sorry I don't know what to do to help you more.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Andréas
>>>>>
>>>>> 2015-02-24 12:49 GMT+01:00 :
>>>>>
>>>>>> Hi Andreas, 
>>>>>>
>>>>>> I can connect using "python manage.py dbshell" it connects without 
>>>>>> any error. 
>>>>>>
>>>>>> Is there a difference, if i am not mistaken the dbshell test shows 
>>>>>> that the configuration of the DB is correct and that i can connect from 
>>>>>> the 
>>>>>> machine, correct

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread Andreas Kuhne
The file you wrote connects to the database itself, it doesn't use djangos
connection, so the only thing you are testing is if you can connect to the
database. And that we know (because you are able to do it with ./manage.py
dbshell). What you need to check is if the settings.py file used by django
is correctly interpreted by mod_wsgi.

Because you are bepassing all of that, your test file will work and just
connects to the database.

As I said earlier, make sure that your mod_wsgi is configured correctly and
that it can read your settings file.

Regards,

Andréas

2015-02-24 16:19 GMT+01:00 :

> Well i have created the below test script to check if i am able to connect
> to the DB using mod_wsgi and i get back the sysdate from the DB.. I have
> configured mod_wsgi under the alias /test to execute the below script and i
> always get the time..  So it seems that the configuration in mod_wsgi is
> correct
> 
> import os,sys
>
> import cx_Oracle
>
>
> con = cx_Oracle.connect("username/password@DB")
> print('DATABASE VERSION: ' + con.version)
> print ''
>
> time= con.cursor()
> time.execute("SELECT TO_CHAR (SYSDATE, 'MM-DD- HH24:MI:SS') FROM DUAL")
>
> for t in time:
> print t
>
> con.close()
>
> def application(environ, start_response):
> status = '200 OK'
> output = 'Hello World! \r\r'
> output += str(t)
> #print sys.stderr
>
> response_headers = [('Content-type', 'text/plain'),
> ('Content-Length', str(len(output)))]
>
> start_response(status, response_headers)
>
> return [output]
>
>
> -
>
>
> On Tuesday, February 24, 2015 at 4:21:01 PM UTC+2, Andréas Kühne wrote:
>>
>> Hmmm
>>
>> You can use ./manage.py dbshell, so your configuration is correct in THAT
>> case, however, have you set all the variables correctly for django when
>> running apache + mod_wsgi? Has the connection ever worked there?
>>
>> What do the config files for mod_wsgi look like and are all of the paths
>> correctly set in the mod_wsgi script?
>>
>> I'm just guessing now, but I think that the problem is your mod_wsgi
>> setup.
>>
>> Regards,
>>
>> Andréas
>>
>> 2015-02-24 14:17 GMT+01:00 :
>>
>>> Is there any way to find out where the problem occurs ?? Is there a way
>>> to enable some debugging or trace in order to see which python scripts are
>>> called in Django and find out where the whole process is failing ??
>>>
>>> In the last lines of the stack trace it tries to close the connection
>>> and for some reason it fails... is it because the connection was never
>>> created ?? or it was closed before the application was ready to send data..
>>> ???
>>>
>>> Can anyone help 
>>>
>>> On Tuesday, February 24, 2015 at 2:08:53 PM UTC+2, Andréas Kühne wrote:
>>>>
>>>> The reason I asked this is because that means that your connection
>>>> parameters are correct, so it should work?
>>>>
>>>> Sorry I don't know what to do to help you more.
>>>>
>>>> Regards,
>>>>
>>>> Andréas
>>>>
>>>> 2015-02-24 12:49 GMT+01:00 :
>>>>
>>>>> Hi Andreas,
>>>>>
>>>>> I can connect using "python manage.py dbshell" it connects without any
>>>>> error.
>>>>>
>>>>> Is there a difference, if i am not mistaken the dbshell test shows
>>>>> that the configuration of the DB is correct and that i can connect from 
>>>>> the
>>>>> machine, correct ?? From the stack trace it seems that the real issue is
>>>>> not returned and the only thing i get is the "NOT CONNECTED TO ORACLE" 
>>>>> error
>>>>>
>>>>>
>>>>> Regards,
>>>>> Alex
>>>>>
>>>>> On Friday, February 20, 2015 at 7:12:05 PM UTC+2, Andréas Kühne wrote:
>>>>>>
>>>>>>
>>>>>> 2015-02-20 17:18 GMT+01:00 :
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I migrated my project to a new infrastructure but i kept the same
>>>>>>> versions Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1
>>>>>>>
>>>>>>> I am trying to run my project and i am getting the below excep

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread alexandrosstylianou88
Well i have created the below test script to check if i am able to connect 
to the DB using mod_wsgi and i get back the sysdate from the DB.. I have 
configured mod_wsgi under the alias /test to execute the below script and i 
always get the time..  So it seems that the configuration in mod_wsgi is 
correct 

import os,sys

import cx_Oracle


con = cx_Oracle.connect("username/password@DB")
print('DATABASE VERSION: ' + con.version)
print ''

time= con.cursor()
time.execute("SELECT TO_CHAR (SYSDATE, 'MM-DD- HH24:MI:SS') FROM DUAL")

for t in time:
print t

con.close()

def application(environ, start_response):
status = '200 OK'
output = 'Hello World! \r\r'
output += str(t)
#print sys.stderr

response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]

start_response(status, response_headers)

return [output]


-


On Tuesday, February 24, 2015 at 4:21:01 PM UTC+2, Andréas Kühne wrote:
>
> Hmmm
>
> You can use ./manage.py dbshell, so your configuration is correct in THAT 
> case, however, have you set all the variables correctly for django when 
> running apache + mod_wsgi? Has the connection ever worked there?
>
> What do the config files for mod_wsgi look like and are all of the paths 
> correctly set in the mod_wsgi script?
>
> I'm just guessing now, but I think that the problem is your mod_wsgi setup.
>
> Regards,
>
> Andréas 
>
> 2015-02-24 14:17 GMT+01:00 >:
>
>> Is there any way to find out where the problem occurs ?? Is there a way 
>> to enable some debugging or trace in order to see which python scripts are 
>> called in Django and find out where the whole process is failing ?? 
>>
>> In the last lines of the stack trace it tries to close the connection and 
>> for some reason it fails... is it because the connection was never created 
>> ?? or it was closed before the application was ready to send data.. ??? 
>>
>> Can anyone help  
>>
>> On Tuesday, February 24, 2015 at 2:08:53 PM UTC+2, Andréas Kühne wrote:
>>>
>>> The reason I asked this is because that means that your connection 
>>> parameters are correct, so it should work?
>>>
>>> Sorry I don't know what to do to help you more.
>>>
>>> Regards,
>>>
>>> Andréas
>>>
>>> 2015-02-24 12:49 GMT+01:00 :
>>>
>>>> Hi Andreas, 
>>>>
>>>> I can connect using "python manage.py dbshell" it connects without any 
>>>> error. 
>>>>
>>>> Is there a difference, if i am not mistaken the dbshell test shows that 
>>>> the configuration of the DB is correct and that i can connect from the 
>>>> machine, correct ?? From the stack trace it seems that the real issue is 
>>>> not returned and the only thing i get is the "NOT CONNECTED TO ORACLE" 
>>>> error
>>>>
>>>>
>>>> Regards,
>>>> Alex
>>>>
>>>> On Friday, February 20, 2015 at 7:12:05 PM UTC+2, Andréas Kühne wrote:
>>>>>
>>>>>
>>>>> 2015-02-20 17:18 GMT+01:00 :
>>>>>
>>>>>> Hi, 
>>>>>>
>>>>>> I migrated my project to a new infrastructure but i kept the same 
>>>>>> versions Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1  
>>>>>>
>>>>>> I am trying to run my project and i am getting the below exception 
>>>>>> that seems to be from Django and i need help pin pointing the exact 
>>>>>> cause, 
>>>>>> because i think that the actual exception is never caught and returned 
>>>>>> to 
>>>>>> the log and all i am getting is the OperationalError: ORA-03114: not 
>>>>>> connected to ORACLE. I checked the Oracle DB and i can connect to it. 
>>>>>>
>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi 
>>>>>> (pid=27565): Exception occurred processing WSGI script 
>>>>>> '/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback 
>>>>>> (most recent call last):
>>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>>>>>> "/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line 50,

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread Andreas Kuhne
Hmmm

You can use ./manage.py dbshell, so your configuration is correct in THAT
case, however, have you set all the variables correctly for django when
running apache + mod_wsgi? Has the connection ever worked there?

What do the config files for mod_wsgi look like and are all of the paths
correctly set in the mod_wsgi script?

I'm just guessing now, but I think that the problem is your mod_wsgi setup.

Regards,

Andréas

2015-02-24 14:17 GMT+01:00 :

> Is there any way to find out where the problem occurs ?? Is there a way to
> enable some debugging or trace in order to see which python scripts are
> called in Django and find out where the whole process is failing ??
>
> In the last lines of the stack trace it tries to close the connection and
> for some reason it fails... is it because the connection was never created
> ?? or it was closed before the application was ready to send data.. ???
>
> Can anyone help 
>
> On Tuesday, February 24, 2015 at 2:08:53 PM UTC+2, Andréas Kühne wrote:
>>
>> The reason I asked this is because that means that your connection
>> parameters are correct, so it should work?
>>
>> Sorry I don't know what to do to help you more.
>>
>> Regards,
>>
>> Andréas
>>
>> 2015-02-24 12:49 GMT+01:00 :
>>
>>> Hi Andreas,
>>>
>>> I can connect using "python manage.py dbshell" it connects without any
>>> error.
>>>
>>> Is there a difference, if i am not mistaken the dbshell test shows that
>>> the configuration of the DB is correct and that i can connect from the
>>> machine, correct ?? From the stack trace it seems that the real issue is
>>> not returned and the only thing i get is the "NOT CONNECTED TO ORACLE" error
>>>
>>>
>>> Regards,
>>> Alex
>>>
>>> On Friday, February 20, 2015 at 7:12:05 PM UTC+2, Andréas Kühne wrote:
>>>>
>>>>
>>>> 2015-02-20 17:18 GMT+01:00 :
>>>>
>>>>> Hi,
>>>>>
>>>>> I migrated my project to a new infrastructure but i kept the same
>>>>> versions Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1
>>>>>
>>>>> I am trying to run my project and i am getting the below exception
>>>>> that seems to be from Django and i need help pin pointing the exact cause,
>>>>> because i think that the actual exception is never caught and returned to
>>>>> the log and all i am getting is the OperationalError: ORA-03114: not
>>>>> connected to ORACLE. I checked the Oracle DB and i can connect to it.
>>>>>
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi
>>>>> (pid=27565): Exception occurred processing WSGI script
>>>>> '/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback
>>>>> (most recent call last):
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>> "/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line 50,
>>>>> in __call__
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] return
>>>>> self.__application(environ, _start_response)
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
>>>>> line 248, in __call__
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>>>> signals.request_finished.send(sender=self.__class__)
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/
>>>>> dispatch/dispatcher.py", line 162, in send
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] response =
>>>>> receiver(signal=self, sender=sender, **named)
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/db/__init__.py",
>>>>> line 82, in close_connection
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>>>> conn.close()
>>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/
>>>>> db/backends/__init__.py", line 70, in c

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread alexandrosstylianou88
Is there any way to find out where the problem occurs ?? Is there a way to 
enable some debugging or trace in order to see which python scripts are 
called in Django and find out where the whole process is failing ?? 

In the last lines of the stack trace it tries to close the connection and 
for some reason it fails... is it because the connection was never created 
?? or it was closed before the application was ready to send data.. ??? 

Can anyone help  

On Tuesday, February 24, 2015 at 2:08:53 PM UTC+2, Andréas Kühne wrote:
>
> The reason I asked this is because that means that your connection 
> parameters are correct, so it should work?
>
> Sorry I don't know what to do to help you more.
>
> Regards,
>
> Andréas
>
> 2015-02-24 12:49 GMT+01:00 >:
>
>> Hi Andreas, 
>>
>> I can connect using "python manage.py dbshell" it connects without any 
>> error. 
>>
>> Is there a difference, if i am not mistaken the dbshell test shows that 
>> the configuration of the DB is correct and that i can connect from the 
>> machine, correct ?? From the stack trace it seems that the real issue is 
>> not returned and the only thing i get is the "NOT CONNECTED TO ORACLE" error
>>
>>
>> Regards,
>> Alex
>>
>> On Friday, February 20, 2015 at 7:12:05 PM UTC+2, Andréas Kühne wrote:
>>>
>>>
>>> 2015-02-20 17:18 GMT+01:00 :
>>>
>>>> Hi, 
>>>>
>>>> I migrated my project to a new infrastructure but i kept the same 
>>>> versions Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1  
>>>>
>>>> I am trying to run my project and i am getting the below exception that 
>>>> seems to be from Django and i need help pin pointing the exact cause, 
>>>> because i think that the actual exception is never caught and returned to 
>>>> the log and all i am getting is the OperationalError: ORA-03114: not 
>>>> connected to ORACLE. I checked the Oracle DB and i can connect to it. 
>>>>
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi 
>>>> (pid=27565): Exception occurred processing WSGI script 
>>>> '/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback (most 
>>>> recent call last):
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>>>> "/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line 50, in 
>>>> __call__
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] return 
>>>> self.__application(environ, _start_response)
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
>>>>  
>>>> line 248, in __call__
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
>>>> signals.request_finished.send(sender=self.__class__)
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/
>>>> django/dispatch/dispatcher.py", line 162, in send
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] response = 
>>>> receiver(signal=self, sender=sender, **named)
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/db/__init__.py",
>>>>  
>>>> line 82, in close_connection
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] conn.close()
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>>>> "/opt/webtier/python_64/lib/python2.6/site-packages/
>>>> django/db/backends/__init__.py", line 70, in close
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
>>>> self.connection.close()
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
>>>> OperationalError: ORA-03114: not connected to ORACLE
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
>>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Request Failed 
>>>> for : /wgtproxy/admin/, Resp Code : [500]
>>>>
>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop recei

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread Andreas Kuhne
The reason I asked this is because that means that your connection
parameters are correct, so it should work?

Sorry I don't know what to do to help you more.

Regards,

Andréas

2015-02-24 12:49 GMT+01:00 :

> Hi Andreas,
>
> I can connect using "python manage.py dbshell" it connects without any
> error.
>
> Is there a difference, if i am not mistaken the dbshell test shows that
> the configuration of the DB is correct and that i can connect from the
> machine, correct ?? From the stack trace it seems that the real issue is
> not returned and the only thing i get is the "NOT CONNECTED TO ORACLE" error
>
>
> Regards,
> Alex
>
> On Friday, February 20, 2015 at 7:12:05 PM UTC+2, Andréas Kühne wrote:
>>
>>
>> 2015-02-20 17:18 GMT+01:00 :
>>
>>> Hi,
>>>
>>> I migrated my project to a new infrastructure but i kept the same
>>> versions Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1
>>>
>>> I am trying to run my project and i am getting the below exception that
>>> seems to be from Django and i need help pin pointing the exact cause,
>>> because i think that the actual exception is never caught and returned to
>>> the log and all i am getting is the OperationalError: ORA-03114: not
>>> connected to ORACLE. I checked the Oracle DB and i can connect to it.
>>>
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi
>>> (pid=27565): Exception occurred processing WSGI script
>>> '/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback (most
>>> recent call last):
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>> "/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line 50, in
>>> __call__
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] return
>>> self.__application(environ, _start_response)
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
>>> line 248, in __call__
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>> signals.request_finished.send(sender=self.__class__)
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>> "/opt/webtier/python_64/lib/python2.6/site-packages/
>>> django/dispatch/dispatcher.py", line 162, in send
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] response =
>>> receiver(signal=self, sender=sender, **named)
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/db/__init__.py",
>>> line 82, in close_connection
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] conn.close()
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
>>> "/opt/webtier/python_64/lib/python2.6/site-packages/
>>> django/db/backends/__init__.py", line 70, in close
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>> self.connection.close()
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>> OperationalError: ORA-03114: not connected to ORACLE
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
>>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Request Failed
>>> for : /wgtproxy/admin/, Resp Code : [500]
>>>
>>>  --
>>> 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...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/88d2de85-f330-4c35-9818-9c19addcc1cf%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/88d2de85-f330-4c35-9818-9c19addcc1cf%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> What happens if you try to do "python manage.py dbshell"? Are you able to
>> connect to the database then?
>>
>> Regards,
>>
>> Andréas
>>
>  --
> You received this message because you are subsc

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread alexandrosstylianou88
Hi Andreas, 

I can connect using "python manage.py dbshell" it connects without any 
error. 

Is there a difference, if i am not mistaken the dbshell test shows that the 
configuration of the DB is correct and that i can connect from the machine, 
correct ?? From the stack trace it seems that the real issue is not 
returned and the only thing i get is the "NOT CONNECTED TO ORACLE" error


Regards,
Alex

On Friday, February 20, 2015 at 7:12:05 PM UTC+2, Andréas Kühne wrote:
>
>
> 2015-02-20 17:18 GMT+01:00 >:
>
>> Hi, 
>>
>> I migrated my project to a new infrastructure but i kept the same 
>> versions Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1  
>>
>> I am trying to run my project and i am getting the below exception that 
>> seems to be from Django and i need help pin pointing the exact cause, 
>> because i think that the actual exception is never caught and returned to 
>> the log and all i am getting is the OperationalError: ORA-03114: not 
>> connected to ORACLE. I checked the Oracle DB and i can connect to it. 
>>
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi 
>> (pid=27565): Exception occurred processing WSGI script 
>> '/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback (most 
>> recent call last):
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>> "/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line 50, in 
>> __call__
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] return 
>> self.__application(environ, _start_response)
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
>>  
>> line 248, in __call__
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
>> signals.request_finished.send(sender=self.__class__)
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/dispatch/dispatcher.py",
>>  
>> line 162, in send
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] response = 
>> receiver(signal=self, sender=sender, **named)
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/db/__init__.py", 
>> line 82, in close_connection
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] conn.close()
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
>> "/opt/webtier/python_64/lib/python2.6/site-packages/django/db/backends/__init__.py",
>>  
>> line 70, in close
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
>> self.connection.close()
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] OperationalError: 
>> ORA-03114: not connected to ORACLE
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
>> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Request Failed 
>> for : /wgtproxy/admin/, Resp Code : [500]
>>
>>  -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/88d2de85-f330-4c35-9818-9c19addcc1cf%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/88d2de85-f330-4c35-9818-9c19addcc1cf%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> What happens if you try to do "python manage.py dbshell"? Are you able to 
> connect to the database then?
>
> Regards,
>
> Andréas
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/71056041-36f4-4392-9303-4775dc80a510%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-20 Thread Andreas Kuhne
2015-02-20 17:18 GMT+01:00 :

> Hi,
>
> I migrated my project to a new infrastructure but i kept the same versions
> Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1
>
> I am trying to run my project and i am getting the below exception that
> seems to be from Django and i need help pin pointing the exact cause,
> because i think that the actual exception is never caught and returned to
> the log and all i am getting is the OperationalError: ORA-03114: not
> connected to ORACLE. I checked the Oracle DB and i can connect to it.
>
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi
> (pid=27565): Exception occurred processing WSGI script
> '/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback (most
> recent call last):
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
> "/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line 50, in
> __call__
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] return
> self.__application(environ, _start_response)
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
> "/opt/webtier/python_64/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
> line 248, in __call__
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
> signals.request_finished.send(sender=self.__class__)
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
> "/opt/webtier/python_64/lib/python2.6/site-packages/django/dispatch/dispatcher.py",
> line 162, in send
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] response =
> receiver(signal=self, sender=sender, **named)
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
> "/opt/webtier/python_64/lib/python2.6/site-packages/django/db/__init__.py",
> line 82, in close_connection
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] conn.close()
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File
> "/opt/webtier/python_64/lib/python2.6/site-packages/django/db/backends/__init__.py",
> line 70, in close
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
> self.connection.close()
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] OperationalError:
> ORA-03114: not connected to ORACLE
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]
> [Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Request Failed for
> : /wgtproxy/admin/, Resp Code : [500]
>
>  --
> 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 django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/88d2de85-f330-4c35-9818-9c19addcc1cf%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/88d2de85-f330-4c35-9818-9c19addcc1cf%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

What happens if you try to do "python manage.py dbshell"? Are you able to
connect to the database then?

Regards,

Andréas

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALXYUbkPGRhv13tyBqmYob7NX2QO0hwcy6zGs2gS1Ae9RO2Ufg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


OperationalError: ORA-03114: not connected to ORACLE

2015-02-20 Thread alexandrosstylianou88
Hi, 

I have migrated my project to a new installation of Apache + mod_wsgi 3.2.1 
+ python 2.6.1 + Django 1.2.1, i kept the same versions just to be sure 
that i do not have any problems with my project. 

I am trying to run the project and i am getting this Oracle exception... 

The DB is fine because i can connect to it using the Oracle Client 
installed on the machine the Apache + mod_wsgi 3.2.1 + python 2.6.1 + 
Django 1.2.1 is installed.


[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi 
(pid=27565): Exception occurred processing WSGI script 
'/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback (most 
recent call last):
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line 50, in 
__call__
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] return 
self.__application(environ, _start_response)
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/webtier/python_64/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
 
line 248, in __call__
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
signals.request_finished.send(sender=self.__class__)
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/webtier/python_64/lib/python2.6/site-packages/django/dispatch/dispatcher.py",
 
line 162, in send
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] response = 
receiver(signal=self, sender=sender, **named)
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/webtier/python_64/lib/python2.6/site-packages/django/db/__init__.py", 
line 82, in close_connection
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] conn.close()
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/webtier/python_64/lib/python2.6/site-packages/django/db/backends/__init__.py",
 
line 70, in close
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
self.connection.close()
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] OperationalError: 
ORA-03114: not connected to ORACLE
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Request Failed for 
: /wgtproxy/admin/, Resp Code : [500]



I need help debugging this it seems that the problem is coming from Django, 
but i think the actual issue is hidden probably some exception that is not 
returned to the logs and the only thing i get is "OperationalError: 
ORA-03114: not connected to ORACLE"

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dd486a6d-b18e-44e0-b85c-8c967d9c00d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


OperationalError: ORA-03114: not connected to ORACLE.

2015-02-20 Thread alexandrosstylianou88
Hi, 

I migrated my project to a new infrastructure but i kept the same versions 
Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1  

I am trying to run my project and i am getting the below exception that 
seems to be from Django and i need help pin pointing the exact cause, 
because i think that the actual exception is never caught and returned to 
the log and all i am getting is the OperationalError: ORA-03114: not 
connected to ORACLE. I checked the Oracle DB and i can connect to it. 

[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] mod_wsgi 
(pid=27565): Exception occurred processing WSGI script 
'/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi'.
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Traceback (most 
recent call last):
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/wgt_proxy/wgtproxyProj/wgtproxy/apache/django.wsgi", line 50, in 
__call__
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] return 
self.__application(environ, _start_response)
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/webtier/python_64/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
 
line 248, in __call__
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
signals.request_finished.send(sender=self.__class__)
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/webtier/python_64/lib/python2.6/site-packages/django/dispatch/dispatcher.py",
 
line 162, in send
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] response = 
receiver(signal=self, sender=sender, **named)
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/webtier/python_64/lib/python2.6/site-packages/django/db/__init__.py", 
line 82, in close_connection
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] conn.close()
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx]   File 
"/opt/webtier/python_64/lib/python2.6/site-packages/django/db/backends/__init__.py",
 
line 70, in close
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
self.connection.close()
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] OperationalError: 
ORA-03114: not connected to ORACLE
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] 
[Fri Feb 20 17:40:51 2015] [error] [client xx.xx.xx.xx] Request Failed for 
: /wgtproxy/admin/, Resp Code : [500]

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/88d2de85-f330-4c35-9818-9c19addcc1cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationalError happening after giving authorization to the class based view

2014-06-08 Thread yutaka kobayashi
, 
> line 53, in execute
>
> return self.cursor.execute(sql, params)
>
>   File 
> "/Library/Python/2.7/site-packages/django/db/backends/sqlite3/base.py", 
> line 451, in execute
>
> return Database.Cursor.execute(self, query, params)
>
> django.db.utils.OperationalError: no such table: south_migrationhistory
>
> -
>
> this whole error message is completely alian to me..
>
>
> as for option number2 I didn't have enough knowledge to comprehend but is 
> it possible to create field from terminal?
>
> I don't know how..
>
> thanks for your help in advance
>
>
>
> 2014年6月6日金曜日 23時52分07秒 UTC+9 sacrac:
>
> Hi, 2 choice 
>
> 1. erase de database y create again the migration:
>  
> $rm database && rm -r addressbook/migrations
> $./manage.py schemamigration addressbook --initial
> $./manage.py migrate
>
> 2. create manually fields owner_id enter terminal or console i see you 
> use sqlite3
>
> i recomended install this addons in firefox for managed database sqlite3 
> if you no like use console
> https://addons.mozilla.org/es/firefox/addon/sqlite-manager/
>
> Cheers
>
>
> On Fri, Jun 6, 2014 at 1:57 AM, yutaka kobayashi  net.com> wrote:
>
>
> hello I'm quite new to django and I'm working on it through following 
> tutorials and stuff.
>
> I'm currently working on this tutorial 
>
> http://effectivedjango.com/tutorial/authzn.html
>
> I'm following the exact code on this page (this page was written for 
> django1.5 so actually I amended a few things to match for django1.6)
>
> It goes perfectly well untill making login page and giving authentication 
> to the user.
> But when it comes to giving authorization like below it gives an error
>
> from django.contrib.auth.decorators import login_requiredfrom 
> django.utils.decorators import method_decoratorclass LoggedInMixin(object):
>
> @method_decorator(login_required)
> def dispatch(self, *args, **kwargs):
> return super(LoggedInMixin, self).dispatch(*args, **kwargs)
>
>
>
>
> class ListContactView(LoggedInMixin, ListView):
>
> model = Contact
> template_name = 'contact_list.html'
>
> def get_queryset(self):
>
> return Contact.objects.filter(owner=self.request.user)
>
> the error message is like this
>
> OperationalError at /addressbook/
>
> no such column: contacts_contact.owner_id
>
>  Request Method:GET Request URL:http://127.0.0.1:8000/addressbook/ Django 
> Version:1.6.5Exception Type: OperationalErrorException Value:
>
> no such column: contacts_contact.owner_id
>
> Exception Location: 
> /Library/Python/2.7/site-packages/django/db/backends/sqlite3/base.py 
> in execute, line 451 Python Executable: /usr/bin/pythonPython Version: 
> 2.7.5Python Path:
>
> ['/Users/kobayashiyutaka/Documents/shannonlab/addressbook',
>  '/Library/Python/2.7/site-packages/openpyxl-1.6.2-py2.7.egg',
>  '/Library/Python/2.7/site-packages/setuptools-1.1.6-py2.7.egg',
>  '/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg',
>  '/Library/Python/2.7/site-packages/oauth2-1.5.211-py2.7.egg',
>  '/Library/Python/2.7/site-packages/python_twitter-1.1-py2.7.egg',
>  '/Library/Python/2.7/site-packages/requests_oauthlib-0.4.0-py2.7.egg',
>  '/Library/Python/2.7/site-packages/requests-2.0.0-py2.7.egg',
>  '/Library/Python/2.7/site-packages/oauthlib-0.6.0-py2.7.egg',
>  '/Library/Python/2.7/site-packages/South-0.8.4-py2.7.egg',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
>  '/Library/Python/2.7/site-packages']
>
> Server time: Wed, 4 Jun 2014 14:55:13 +
> Error during

Re: OperationalError happening after giving authorization to the class based view

2014-06-06 Thread carlos
Hi, 2 choice

1. erase de database y create again the migration:

$rm database && rm -r addressbook/migrations
$./manage.py schemamigration addressbook --initial
$./manage.py migrate

2. create manually fields owner_id enter terminal or console i see you use
sqlite3

i recomended install this addons in firefox for managed database sqlite3 if
you no like use console
https://addons.mozilla.org/es/firefox/addon/sqlite-manager/

Cheers


On Fri, Jun 6, 2014 at 1:57 AM, yutaka kobayashi <
yutaka.kobaya...@todai-dream-net.com> wrote:

>
> hello I'm quite new to django and I'm working on it through following
> tutorials and stuff.
>
> I'm currently working on this tutorial
>
> http://effectivedjango.com/tutorial/authzn.html
>
> I'm following the exact code on this page (this page was written for
> django1.5 so actually I amended a few things to match for django1.6)
>
> It goes perfectly well untill making login page and giving authentication
> to the user.
> But when it comes to giving authorization like below it gives an error
>
> from django.contrib.auth.decorators import login_requiredfrom 
> django.utils.decorators import method_decoratorclass LoggedInMixin(object):
>
> @method_decorator(login_required)
> def dispatch(self, *args, **kwargs):
> return super(LoggedInMixin, self).dispatch(*args, **kwargs)
>
>
> class ListContactView(LoggedInMixin, ListView):
>
> model = Contact
> template_name = 'contact_list.html'
>
> def get_queryset(self):
>
> return Contact.objects.filter(owner=self.request.user)
>
> the error message is like this
>
> OperationalError at /addressbook/
>
> no such column: contacts_contact.owner_id
>
> Request Method:GET Request URL:http://127.0.0.1:8000/addressbook/ Django
> Version:1.6.5Exception Type: OperationalErrorException Value:
>
>
> no such column: contacts_contact.owner_id
>
> Exception Location:
> /Library/Python/2.7/site-packages/django/db/backends/sqlite3/base.py in
> execute, line 451Python Executable: /usr/bin/pythonPython Version: 2.7.5Python
> Path:
>
>
> ['/Users/kobayashiyutaka/Documents/shannonlab/addressbook',
>  '/Library/Python/2.7/site-packages/openpyxl-1.6.2-py2.7.egg',
>  '/Library/Python/2.7/site-packages/setuptools-1.1.6-py2.7.egg',
>  '/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg',
>  '/Library/Python/2.7/site-packages/oauth2-1.5.211-py2.7.egg',
>  '/Library/Python/2.7/site-packages/python_twitter-1.1-py2.7.egg',
>  '/Library/Python/2.7/site-packages/requests_oauthlib-0.4.0-py2.7.egg',
>  '/Library/Python/2.7/site-packages/requests-2.0.0-py2.7.egg',
>  '/Library/Python/2.7/site-packages/oauthlib-0.6.0-py2.7.egg',
>  '/Library/Python/2.7/site-packages/South-0.8.4-py2.7.egg',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
>  '/Library/Python/2.7/site-packages']
>
> Server time: Wed, 4 Jun 2014 14:55:13 +
> Error during template rendering
>
> In template
> /Users/kobayashiyutaka/Documents/shannonlab/addressbook/contacts/templates/contacts/contact_list.html,
> error at line *7*
> no such column: contacts_contact.owner_id 1{% extends "base.html" %} 2 3
> {% block content %} 4 contact list 5 6  style="list-style-type: none"> 7 {% for contact in object_list %} 8  class="contact"> 9 {{ contact
> }} 10 (edit) 11
>  12 {% endfor %} 13  14 15  %}">add contact 16 {% endblock %} 17
> Traceback Switch to copy-and-paste view
> <http://127.0.0.1:8000/addressbook/#>
>
>- /Library/Python/2.7/site-packages/django/core/handlers/base.py in
>get_response
>1.
>
>   response = response.render()
&g

Re: PostgreSQL OperationalError

2013-10-18 Thread Muhammed TÜFEKYAPAN
I restart and problem solved.

Thanks everbody.

Best.

On Friday, October 18, 2013 11:28:45 AM UTC+3, Muhammed TÜFEKYAPAN wrote:
>
> Hello,
>
>
> I just start to publish my app on web. Everything going well but I face a 
> new problem, before I never face. Site working but sometimes raise error 
> like this;
>
> OperationalError at / 
>
> fe_sendauth: no password supplied
>
>
>
> Full error looks like this;
>
> OperationalError at / 
>
> fe_sendauth: no password supplied
>
>  Request Method: GET  Request URL: http://www.domain.co/  Django Version: 
> 1.5.1  Exception Type: OperationalError  Exception Value: 
>
> fe_sendauth: no password supplied
>
>  Exception Location: /var/www/
> www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.pyin 
> connect, line 164  Python 
> Executable: /var/www/www.domain.co/env/bin/python  Python Version: 2.7.3  
> Python 
> Path: 
>
> ['/var/www/www.domain.co/dictionaryproject',
>  '/var/www/www.domain.co/env/bin',
>  '/var/www/www.domain.co/env/lib/python2.7',
>  '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-old',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-linux2',
>  '/usr/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/local/lib/python2.7/site-packages']
>
>  Server time: Fri, 18 Oct 2013 03:26:32 -0500
>
>
> What is the problem and how can I solve it?
>
>
> Best.
>
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f6b14a90-6ab7-4bbf-a85b-670cbc8ef6c3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: PostgreSQL OperationalError

2013-10-18 Thread Xavier Ordoquy
If you are using anything other than the devserver, you'll need to reload / 
restart your service in order for your changes to take effects.
Django/webservers differ a couple of things until a request comes. This means 
that if you changed the settings after a first request you may have a some 
threads that don't have correct settings and some that do.

Regards,
Xavier,
Linovia.

Le 18 oct. 2013 à 11:38, Muhammed TÜFEKYAPAN  a écrit :

> Thanks for answer. But if my login and pass didn't match, it always raise 
> error. It just sometimes raise error, sometimes doesn't. 
> 
> 
> 2013/10/18 Xavier Ordoquy 
> Hello,
> 
> Your DATABASES settings aren't correct.
> fe_sendauth is about Postgresql complaining the login/password didn't match.
> 
> Regards,
> Xavier,
> Linovia.
> 
> Le 18 oct. 2013 à 10:28, Muhammed TÜFEKYAPAN  a écrit :
> 
>> Hello,
>> 
>> 
>> I just start to publish my app on web. Everything going well but I face a 
>> new problem, before I never face. Site working but sometimes raise error 
>> like this;
>> 
>> OperationalError at /
>> 
>> fe_sendauth: no password supplied
>> 
>> 
>> 
>> Full error looks like this;
>> 
>> OperationalError at /
>> 
>> fe_sendauth: no password supplied
>> Request Method:  GET
>> Request URL: http://www.domain.co/
>> Django Version:  1.5.1
>> Exception Type:  OperationalError
>> Exception Value: 
>> fe_sendauth: no password supplied
>> Exception Location:  
>> /var/www/www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.py
>>  in connect, line 164
>> Python Executable:   /var/www/www.domain.co/env/bin/python
>> Python Version:  2.7.3
>> Python Path: 
>> ['/var/www/www.domain.co/dictionaryproject',
>>  '/var/www/www.domain.co/env/bin',
>>  '/var/www/www.domain.co/env/lib/python2.7',
>>  '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
>>  '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
>>  '/var/www/www.domain.co/env/lib/python2.7/lib-old',
>>  '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
>>  '/usr/lib/python2.7',
>>  '/usr/lib/python2.7/plat-linux2',
>>  '/usr/lib/python2.7/lib-tk',
>>  '/var/www/www.domain.co/env/local/lib/python2.7/site-packages']
>> Server time: Fri, 18 Oct 2013 03:26:32 -0500
>> 
>> 
>> What is the problem and how can I solve it?
>> 
>> 
>> Best.
>> 
>> 
>> -- 
>> 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 django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/108c39f7-dc12-435f-8eb0-77a761708aa7%40googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Django users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/django-users/oM0ayk0Mw0U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/25F0DFE7-2D50-48D2-A9C3-23F2872CFE85%40linovia.com.
> 
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> -- 
> Muhammed Tüfekyapan
> İTÜ - Tekstil Müh.
> 532 172 70 66
> 
> -- 
> 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 django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CA%2BMQMxUNZEHaoWz-aPR_ODKyr92wHefdM0SddHC6yPxf7%3D8rFg%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/E4E445DD-20F6-44EE-A876-EE7939D39CE3%40linovia.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: PostgreSQL OperationalError

2013-10-18 Thread Muhammed TÜFEKYAPAN
Thanks for answer. But if my login and pass didn't match, it always raise
error. It just sometimes raise error, sometimes doesn't.


2013/10/18 Xavier Ordoquy 

> Hello,
>
> Your DATABASES settings aren't correct.
> fe_sendauth is about Postgresql complaining the login/password didn't
> match.
>
> Regards,
> Xavier,
> Linovia.
>
> Le 18 oct. 2013 à 10:28, Muhammed TÜFEKYAPAN  a
> écrit :
>
> Hello,
>
>
> I just start to publish my app on web. Everything going well but I face a
> new problem, before I never face. Site working but sometimes raise error
> like this;
>
> OperationalError at /
>
> fe_sendauth: no password supplied
>
>
>
> Full error looks like this;
>
> OperationalError at /
>
> fe_sendauth: no password supplied
>
>  Request Method: GET  Request URL: http://www.domain.co/  Django Version:
> 1.5.1  Exception Type: OperationalError  Exception Value:
>
> fe_sendauth: no password supplied
>
>  Exception Location: /var/www/
> www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.pyin 
> connect, line 164  Python
> Executable: /var/www/www.domain.co/env/bin/python  Python Version: 2.7.3  
> Python
> Path:
>
> ['/var/www/www.domain.co/dictionaryproject',
>  '/var/www/www.domain.co/env/bin',
>  '/var/www/www.domain.co/env/lib/python2.7',
>  '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-old',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-linux2',
>  '/usr/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/local/lib/python2.7/site-packages'] 
> <http://www.domain.co/env/local/lib/python2.7/site-packages'%5D>
>
>  Server time: Fri, 18 Oct 2013 03:26:32 -0500
>
>
> What is the problem and how can I solve it?
>
>
> Best.
>
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/108c39f7-dc12-435f-8eb0-77a761708aa7%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/oM0ayk0Mw0U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/25F0DFE7-2D50-48D2-A9C3-23F2872CFE85%40linovia.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
*Muhammed Tüfekyapan
*
*İTÜ - Tekstil Müh.*
*532 172 70 66*

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BMQMxUNZEHaoWz-aPR_ODKyr92wHefdM0SddHC6yPxf7%3D8rFg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: PostgreSQL OperationalError

2013-10-18 Thread Xavier Ordoquy
Hello,

Your DATABASES settings aren't correct.
fe_sendauth is about Postgresql complaining the login/password didn't match.

Regards,
Xavier,
Linovia.

Le 18 oct. 2013 à 10:28, Muhammed TÜFEKYAPAN  a écrit :

> Hello,
> 
> 
> I just start to publish my app on web. Everything going well but I face a new 
> problem, before I never face. Site working but sometimes raise error like 
> this;
> 
> OperationalError at /
> 
> fe_sendauth: no password supplied
> 
> 
> 
> Full error looks like this;
> 
> OperationalError at /
> 
> fe_sendauth: no password supplied
> Request Method:   GET
> Request URL:  http://www.domain.co/
> Django Version:   1.5.1
> Exception Type:   OperationalError
> Exception Value:  
> fe_sendauth: no password supplied
> Exception Location:   
> /var/www/www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.py
>  in connect, line 164
> Python Executable:/var/www/www.domain.co/env/bin/python
> Python Version:   2.7.3
> Python Path:  
> ['/var/www/www.domain.co/dictionaryproject',
>  '/var/www/www.domain.co/env/bin',
>  '/var/www/www.domain.co/env/lib/python2.7',
>  '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-old',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-linux2',
>  '/usr/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/local/lib/python2.7/site-packages']
> Server time:  Fri, 18 Oct 2013 03:26:32 -0500
> 
> 
> What is the problem and how can I solve it?
> 
> 
> Best.
> 
> 
> -- 
> 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 django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/108c39f7-dc12-435f-8eb0-77a761708aa7%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/25F0DFE7-2D50-48D2-A9C3-23F2872CFE85%40linovia.com.
For more options, visit https://groups.google.com/groups/opt_out.


PostgreSQL OperationalError

2013-10-18 Thread Muhammed TÜFEKYAPAN
Hello,


I just start to publish my app on web. Everything going well but I face a 
new problem, before I never face. Site working but sometimes raise error 
like this;

OperationalError at / 

fe_sendauth: no password supplied



Full error looks like this;

OperationalError at / 

fe_sendauth: no password supplied

 Request Method: GET  Request URL: http://www.domain.co/  Django Version: 
1.5.1  Exception Type: OperationalError  Exception Value: 

fe_sendauth: no password supplied

 Exception Location: 
/var/www/www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.py
 
in connect, line 164  Python Executable: 
/var/www/www.domain.co/env/bin/python  Python Version: 2.7.3  Python Path: 

['/var/www/www.domain.co/dictionaryproject',
 '/var/www/www.domain.co/env/bin',
 '/var/www/www.domain.co/env/lib/python2.7',
 '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
 '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
 '/var/www/www.domain.co/env/lib/python2.7/lib-old',
 '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/var/www/www.domain.co/env/local/lib/python2.7/site-packages']

 Server time: Fri, 18 Oct 2013 03:26:32 -0500


What is the problem and how can I solve it?


Best.

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/108c39f7-dc12-435f-8eb0-77a761708aa7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Middleware Causing OperationalError: (2006, 'MySQL server has gone away')

2013-09-18 Thread Paul Childs
After much research and help from a DBA in a company the solution to the 
problem was to put the following in the mysqld section of the my.ini file:

max_allowed_packet=128M

I think that the HTML header was so large that when the middleware made a 
call to MySQL it couldn't handle the size of the packet, which I am told is 
only 1MB by default for windows.

On Tuesday, September 10, 2013 11:01:42 AM UTC-3, Paul Childs wrote:
>
> Environment: Django 1.4, MySQL 5.5.33
>
> In one of my views I am consistently getting  a MySQL 
> error: OperationalError: (2006, 'MySQL server has gone away')
>
> Traceback (most recent call last):
>   File "C:\Python26\Lib\wsgiref\handlers.py", line 93, in run
> self.result = application(self.environ, self.start_response)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\contrib\staticfiles\handlers.py",
>  
> line 67, in __call__
> return self.application(environ, start_response)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\wsgi.py", 
> line 241, in __call__
> response = self.get_response(request)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py", 
> line 191, in get_response
> signals.got_request_exception.send(sender=self.__class__, 
> request=request)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\dispatch\dispatcher.py", 
> line 172, in send
> response = receiver(signal=self, sender=sender, **named)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\__init__.py", line 
> 62, in _rollback_on_exception
> transaction.rollback_unless_managed(using=conn)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\transaction.py", 
> line 129, in rollback_unless_managed
> connection.rollback_unless_managed()
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\__init__.py", 
> line 214, in rollback_unless_managed
> self._rollback()
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\mysql\base.py",
>  
> line 404, in _rollback
> BaseDatabaseWrapper._rollback(self)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\__init__.py", 
> line 54, in _rollback
> return self.connection.rollback()
> OperationalError: (2006, 'MySQL server has gone away')
> [10/Sep/2013 10:29:11] "GET /trending/res_entry/pim/0/ HTTP/1.1" 500 59
>
> Looking at the stack trace it didn't look like the problem was with my 
> view.
>
> I traced through the code and the error occurs in one of the middleware 
> methods that is executed when I redirect to another page:
>
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(67)res_management()
> -> q_ress = Res.objects.filter(maintenance_phase=maintenance_phase)    
> Hitting the DB OK here
> (Pdb)
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(69)res_management()
> -> res_list = fmas.get_ress(q_ress, mode, maintenance_phase)
> (Pdb)
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(70)res_management()
> -> request.session['my_res_list'] = res_list
> (Pdb)
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(71)res_management()
> -> return redirect('/trending/res_{0}/{1}/1/'.format(mode,
> (Pdb)
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(72)res_management()
> -> maintenance_phase))
> (Pdb)
> --Return--
> > 
> c:\virtual_env\sitar_env2\cissimp\trending\views.py(72)res_management()->
> -> maintenance_phase))
> (Pdb)
> > 
> c:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py(124)get_response()
> -> if response is None:
> (Pdb) response is None
> False
> (Pdb) n
> > 
> c:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py(133)get_response()
> -> if hasattr(response, 'render') and callable(response.render):
> (Pdb) l
> 128 view_name = callback.__class__.__name__ + 
> '.__call__' # If it's a class
> 129 raise ValueError("The view %s.%s didn't return 
> an HttpResponse object." % (callback.__module__, view_name))
> 130
> 131 # If the response supports deferred rendering, 
> apply template
> 132 # response middleware and the render the response
> 133  -> if hasattr(response, 'render') and 
> callable(response.render):
> 134 for middleware_method in 
> self._template_response_middl

Re: Middleware Causing OperationalError: (2006, 'MySQL server has gone away')

2013-09-10 Thread Sanjay Bhangar
On Tue, Sep 10, 2013 at 7:50 PM, Paul Childs  wrote:

> I went as far as to reboot my machine.
> I tried the view and it worked but then my other view started exhibiting
> the same error message.
>
>
Not sure if this helps, but I saw this once recently on a colleague's
windows machine. I'm going to see if we can reproduce it and try and add
more details, but I do remember it being hard to reproduce, so we let it
go. Sorry, not very helpful, but just wanted to let you know that it seems
like you may not be the only one who's run into this. Hopefully I'll be
able to reproduce the error with the colleague and get back - if it helps,
I'm fairly certain it is windows-specific, of course, I cannot be sure
(same project with same code runs without problem on my ubuntu machine).

Please do post if you find a solution, of course :-)

thanks,
Sanjay



> On Tuesday, September 10, 2013 11:01:42 AM UTC-3, Paul Childs wrote:
>>
>> Environment: Django 1.4, MySQL 5.5.33
>>
>> In one of my views I am consistently getting  a MySQL
>> error: OperationalError: (2006, 'MySQL server has gone away')
>>
>> Traceback (most recent call last):
>>   File "C:\Python26\Lib\wsgiref\**handlers.py", line 93, in run
>> self.result = application(self.environ, self.start_response)
>>   File "C:\virtual_env\sitar_env2\**lib\site-packages\django\**
>> contrib\staticfiles\handlers.**py", line 67, in __call__
>> return self.application(environ, start_response)
>>   File 
>> "C:\virtual_env\sitar_env2\**lib\site-packages\django\core\**handlers\wsgi.py",
>> line 241, in __call__
>> response = self.get_response(request)
>>   File 
>> "C:\virtual_env\sitar_env2\**lib\site-packages\django\core\**handlers\base.py",
>> line 191, in get_response
>> signals.got_request_exception.**send(sender=self.__class__,
>> request=request)
>>   File 
>> "C:\virtual_env\sitar_env2\**lib\site-packages\django\**dispatch\dispatcher.py",
>> line 172, in send
>> response = receiver(signal=self, sender=sender, **named)
>>   File 
>> "C:\virtual_env\sitar_env2\**lib\site-packages\django\db\__**init__.py",
>> line 62, in _rollback_on_exception
>> transaction.rollback_unless_**managed(using=conn)
>>   File 
>> "C:\virtual_env\sitar_env2\**lib\site-packages\django\db\**transaction.py",
>> line 129, in rollback_unless_managed
>> connection.rollback_unless_**managed()
>>   File 
>> "C:\virtual_env\sitar_env2\**lib\site-packages\django\db\**backends\__init__.py",
>> line 214, in rollback_unless_managed
>> self._rollback()
>>   File 
>> "C:\virtual_env\sitar_env2\**lib\site-packages\django\db\**backends\mysql\base.py",
>> line 404, in _rollback
>> BaseDatabaseWrapper._rollback(**self)
>>   File 
>> "C:\virtual_env\sitar_env2\**lib\site-packages\django\db\**backends\__init__.py",
>> line 54, in _rollback
>> return self.connection.rollback()
>> OperationalError: (2006, 'MySQL server has gone away')
>> [10/Sep/2013 10:29:11] "GET /trending/res_entry/pim/0/ HTTP/1.1" 500 59
>>
>> Looking at the stack trace it didn't look like the problem was with my
>> view.
>>
>> I traced through the code and the error occurs in one of the middleware
>> methods that is executed when I redirect to another page:
>>
>> > c:\virtual_env\sitar_env2\**cissimp\trending\views.py(67)**
>> res_management()
>> -> q_ress = Res.objects.filter(**maintenance_phase=maintenance_**phase)
>>    Hitting the DB OK here
>> (Pdb)
>> > c:\virtual_env\sitar_env2\**cissimp\trending\views.py(69)**
>> res_management()
>> -> res_list = fmas.get_ress(q_ress, mode, maintenance_phase)
>> (Pdb)
>> > c:\virtual_env\sitar_env2\**cissimp\trending\views.py(70)**
>> res_management()
>> -> request.session['my_res_list'] = res_list
>> (Pdb)
>> > c:\virtual_env\sitar_env2\**cissimp\trending\views.py(71)**
>> res_management()
>> -> return redirect('/trending/res_{0}/{**1}/1/'.format(mode,
>> (Pdb)
>> > c:\virtual_env\sitar_env2\**cissimp\trending\views.py(72)**
>> res_management()
>> -> maintenance_phase))
>> (Pdb)
>> --Return--
>> > c:\virtual_env\sitar_env2\**cissimp\trending\views.py(72)**
>> res_management()->
>> -> maintenance_phase))
>> (Pdb)
>> > c:\virtual_env\sitar_env2\lib\**site-packages\django\core\**
>> handlers\base.py(124)get_**response()
>> -> i

Re: Middleware Causing OperationalError: (2006, 'MySQL server has gone away')

2013-09-10 Thread Paul Childs
I ran my test suite and the error didn't crop up there.
All tests that run my views passed.

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Middleware Causing OperationalError: (2006, 'MySQL server has gone away')

2013-09-10 Thread Paul Childs
Hey Sanjay,

Thanks for the reply.
I will probably pick at this problem every so often but I am not hopeful 
about finding a solution as the problem seems to be down deep in Django. 
I'm afraid that I will probably be out of my league on this one.
I have been wanting to upgrade my Djano version for a while now and I may 
resort to bumping up to 1.5 or even 1.6 to see if that fixes things.

Cheers,
/Paul

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Middleware Causing OperationalError: (2006, 'MySQL server has gone away')

2013-09-10 Thread Paul Childs
I went as far as to reboot my machine.
I tried the view and it worked but then my other view started exhibiting 
the same error message.

On Tuesday, September 10, 2013 11:01:42 AM UTC-3, Paul Childs wrote:
>
> Environment: Django 1.4, MySQL 5.5.33
>
> In one of my views I am consistently getting  a MySQL 
> error: OperationalError: (2006, 'MySQL server has gone away')
>
> Traceback (most recent call last):
>   File "C:\Python26\Lib\wsgiref\handlers.py", line 93, in run
> self.result = application(self.environ, self.start_response)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\contrib\staticfiles\handlers.py",
>  
> line 67, in __call__
> return self.application(environ, start_response)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\wsgi.py", 
> line 241, in __call__
> response = self.get_response(request)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py", 
> line 191, in get_response
> signals.got_request_exception.send(sender=self.__class__, 
> request=request)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\dispatch\dispatcher.py", 
> line 172, in send
> response = receiver(signal=self, sender=sender, **named)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\__init__.py", line 
> 62, in _rollback_on_exception
> transaction.rollback_unless_managed(using=conn)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\transaction.py", 
> line 129, in rollback_unless_managed
> connection.rollback_unless_managed()
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\__init__.py", 
> line 214, in rollback_unless_managed
> self._rollback()
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\mysql\base.py",
>  
> line 404, in _rollback
> BaseDatabaseWrapper._rollback(self)
>   File 
> "C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\__init__.py", 
> line 54, in _rollback
> return self.connection.rollback()
> OperationalError: (2006, 'MySQL server has gone away')
> [10/Sep/2013 10:29:11] "GET /trending/res_entry/pim/0/ HTTP/1.1" 500 59
>
> Looking at the stack trace it didn't look like the problem was with my 
> view.
>
> I traced through the code and the error occurs in one of the middleware 
> methods that is executed when I redirect to another page:
>
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(67)res_management()
> -> q_ress = Res.objects.filter(maintenance_phase=maintenance_phase)    
> Hitting the DB OK here
> (Pdb)
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(69)res_management()
> -> res_list = fmas.get_ress(q_ress, mode, maintenance_phase)
> (Pdb)
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(70)res_management()
> -> request.session['my_res_list'] = res_list
> (Pdb)
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(71)res_management()
> -> return redirect('/trending/res_{0}/{1}/1/'.format(mode,
> (Pdb)
> > c:\virtual_env\sitar_env2\cissimp\trending\views.py(72)res_management()
> -> maintenance_phase))
> (Pdb)
> --Return--
> > 
> c:\virtual_env\sitar_env2\cissimp\trending\views.py(72)res_management()->
> -> maintenance_phase))
> (Pdb)
> > 
> c:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py(124)get_response()
> -> if response is None:
> (Pdb) response is None
> False
> (Pdb) n
> > 
> c:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py(133)get_response()
> -> if hasattr(response, 'render') and callable(response.render):
> (Pdb) l
> 128 view_name = callback.__class__.__name__ + 
> '.__call__' # If it's a class
> 129 raise ValueError("The view %s.%s didn't return 
> an HttpResponse object." % (callback.__module__, view_name))
> 130
> 131 # If the response supports deferred rendering, 
> apply template
> 132 # response middleware and the render the response
> 133  -> if hasattr(response, 'render') and 
> callable(response.render):
> 134 for middleware_method in 
> self._template_response_middleware:
> 135 response = middleware_method(request, 
> response)
> 136 response = response.render()
> 137
> 138 except http.Http404, e:
> (P

Middleware Causing OperationalError: (2006, 'MySQL server has gone away')

2013-09-10 Thread Paul Childs
Environment: Django 1.4, MySQL 5.5.33

In one of my views I am consistently getting  a MySQL 
error: OperationalError: (2006, 'MySQL server has gone away')

Traceback (most recent call last):
  File "C:\Python26\Lib\wsgiref\handlers.py", line 93, in run
self.result = application(self.environ, self.start_response)
  File 
"C:\virtual_env\sitar_env2\lib\site-packages\django\contrib\staticfiles\handlers.py",
 
line 67, in __call__
return self.application(environ, start_response)
  File 
"C:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\wsgi.py", 
line 241, in __call__
response = self.get_response(request)
  File 
"C:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py", 
line 191, in get_response
signals.got_request_exception.send(sender=self.__class__, 
request=request)
  File 
"C:\virtual_env\sitar_env2\lib\site-packages\django\dispatch\dispatcher.py", 
line 172, in send
response = receiver(signal=self, sender=sender, **named)
  File "C:\virtual_env\sitar_env2\lib\site-packages\django\db\__init__.py", 
line 62, in _rollback_on_exception
transaction.rollback_unless_managed(using=conn)
  File 
"C:\virtual_env\sitar_env2\lib\site-packages\django\db\transaction.py", 
line 129, in rollback_unless_managed
connection.rollback_unless_managed()
  File 
"C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\__init__.py", 
line 214, in rollback_unless_managed
self._rollback()
  File 
"C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\mysql\base.py", 
line 404, in _rollback
BaseDatabaseWrapper._rollback(self)
  File 
"C:\virtual_env\sitar_env2\lib\site-packages\django\db\backends\__init__.py", 
line 54, in _rollback
return self.connection.rollback()
OperationalError: (2006, 'MySQL server has gone away')
[10/Sep/2013 10:29:11] "GET /trending/res_entry/pim/0/ HTTP/1.1" 500 59

Looking at the stack trace it didn't look like the problem was with my view.

I traced through the code and the error occurs in one of the middleware 
methods that is executed when I redirect to another page:

> c:\virtual_env\sitar_env2\cissimp\trending\views.py(67)res_management()
-> q_ress = Res.objects.filter(maintenance_phase=maintenance_phase)    
Hitting the DB OK here
(Pdb)
> c:\virtual_env\sitar_env2\cissimp\trending\views.py(69)res_management()
-> res_list = fmas.get_ress(q_ress, mode, maintenance_phase)
(Pdb)
> c:\virtual_env\sitar_env2\cissimp\trending\views.py(70)res_management()
-> request.session['my_res_list'] = res_list
(Pdb)
> c:\virtual_env\sitar_env2\cissimp\trending\views.py(71)res_management()
-> return redirect('/trending/res_{0}/{1}/1/'.format(mode,
(Pdb)
> c:\virtual_env\sitar_env2\cissimp\trending\views.py(72)res_management()
-> maintenance_phase))
(Pdb)
--Return--
> 
c:\virtual_env\sitar_env2\cissimp\trending\views.py(72)res_management()->
-> maintenance_phase))
(Pdb)
> 
c:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py(124)get_response()
-> if response is None:
(Pdb) response is None
False
(Pdb) n
> 
c:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py(133)get_response()
-> if hasattr(response, 'render') and callable(response.render):
(Pdb) l
128 view_name = callback.__class__.__name__ + 
'.__call__' # If it's a class
129 raise ValueError("The view %s.%s didn't return 
an HttpResponse object." % (callback.__module__, view_name))
130
131 # If the response supports deferred rendering, 
apply template
132 # response middleware and the render the response
133  -> if hasattr(response, 'render') and 
callable(response.render):
134 for middleware_method in 
self._template_response_middleware:
135 response = middleware_method(request, 
response)
136 response = response.render()
137
138 except http.Http404, e:
(Pdb) n
> 
c:\virtual_env\sitar_env2\lib\site-packages\django\core\handlers\base.py(183)get_response()
-> urlresolvers.set_urlconf(None)
(Pdb) l
178 
signals.got_request_exception.send(sender=self.__class__, request=request)
179 response = self.handle_uncaught_exception(request, 
resolver, sys.exc_info())
180 finally:
181 # Reset URLconf for this thread on the way out for 
complete
182 # isolation of request.urlconf
183  -> urlresolvers.set_urlconf(None)
184
185 try:
186 # Apply response middleware, regardless of the response
187 for middleware_method in self._response_middleware:
18

Re: OperationalError: unable to open database file

2013-08-30 Thread Dan Gentry
When using sqlite3, one has to provide a full path to the database file. 
 For my projects I use something like this on my development machines (for 
a database file named 'db'):

import os 
PROJECT_DIR = os.path.dirname(__file__) 

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', 
'NAME': os.path.join(PROJECT_DIR, 'db'),
}
}


On Monday, July 22, 2013 1:48:43 PM UTC-4, Stian Sjøli wrote:
>
> i get this error while going throught the tutorial from the django 
> website. I am a mac user, and have modified my settings-file to use sqlite3 
> and the name variable to say "./mysite". Any suggestions why I get this 
> error?
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: OperationalError: unable to open database file

2013-08-30 Thread jumpmanlane
make sure you don't have another instance of django running already.

-J

On Monday, July 22, 2013 1:48:43 PM UTC-4, Stian Sjøli wrote:
>
> i get this error while going throught the tutorial from the django 
> website. I am a mac user, and have modified my settings-file to use sqlite3 
> and the name variable to say "./mysite". Any suggestions why I get this 
> error?
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


OperationalError: unable to open database file

2013-07-22 Thread Stian Sjøli
i get this error while going throught the tutorial from the django website. 
I am a mac user, and have modified my settings-file to use sqlite3 and the 
name variable to say "./mysite". Any suggestions why I get this error?

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: OperationalError: (1040, 'Too many connections')

2013-05-19 Thread frocco
Thank you,
I finally got this working by doing one app at a time.
Then I had to deal with sequence errors.

I tried and reset them all, now I am hoping I will have no issues when 
users start 
using my website on Monday.

On Sunday, May 19, 2013 2:55:47 AM UTC-4, Artem Zinoviev wrote:
>
>
> http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL
>
> суббота, 18 мая 2013 г., 20:00:15 UTC+3 пользователь frocco написал:
>>
>> I have been looking for an easy way to convert, but nothing works for me.
>> I tried dumpdata, loaddata, but get duplicate key, when I look at the 
>> file, I see no duplicates.
>>
>> I am open to suggestions on converting.
>>
>> Thanks
>>
>> On Saturday, May 18, 2013 12:51:28 PM UTC-4, Artem Zinoviev wrote:
>>>
>>> use postgreSQL
>>>
>>> пятница, 17 мая 2013 г., 21:24:10 UTC+3 пользователь frocco написал:

 Hello,

 How can I resolve this in django 1.5?

 webfaction allows max 90 connections.

 Thanks

>>>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: OperationalError: (1040, 'Too many connections')

2013-05-18 Thread Artem Zinoviev
http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL

суббота, 18 мая 2013 г., 20:00:15 UTC+3 пользователь frocco написал:
>
> I have been looking for an easy way to convert, but nothing works for me.
> I tried dumpdata, loaddata, but get duplicate key, when I look at the 
> file, I see no duplicates.
>
> I am open to suggestions on converting.
>
> Thanks
>
> On Saturday, May 18, 2013 12:51:28 PM UTC-4, Artem Zinoviev wrote:
>>
>> use postgreSQL
>>
>> пятница, 17 мая 2013 г., 21:24:10 UTC+3 пользователь frocco написал:
>>>
>>> Hello,
>>>
>>> How can I resolve this in django 1.5?
>>>
>>> webfaction allows max 90 connections.
>>>
>>> Thanks
>>>
>>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: OperationalError: (1040, 'Too many connections')

2013-05-18 Thread frocco
I have been looking for an easy way to convert, but nothing works for me.
I tried dumpdata, loaddata, but get duplicate key, when I look at the file, 
I see no duplicates.

I am open to suggestions on converting.

Thanks

On Saturday, May 18, 2013 12:51:28 PM UTC-4, Artem Zinoviev wrote:
>
> use postgreSQL
>
> пятница, 17 мая 2013 г., 21:24:10 UTC+3 пользователь frocco написал:
>>
>> Hello,
>>
>> How can I resolve this in django 1.5?
>>
>> webfaction allows max 90 connections.
>>
>> Thanks
>>
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: OperationalError: (1040, 'Too many connections')

2013-05-18 Thread Artem Zinoviev
use postgreSQL

пятница, 17 мая 2013 г., 21:24:10 UTC+3 пользователь frocco написал:
>
> Hello,
>
> How can I resolve this in django 1.5?
>
> webfaction allows max 90 connections.
>
> Thanks
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




OperationalError: (1040, 'Too many connections')

2013-05-17 Thread frocco
Hello,

How can I resolve this in django 1.5?

webfaction allows max 90 connections.

Thanks

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-04-28 Thread Arturo Paul Castro Calvo
try to define the parameters so

'ENGINE': 'django.db.backends.mysql', 
'NAME': 'yourdbname',  
'USER': 'root',  
'PASSWORD': 'your password', 
'HOST': '127.0.0.1', 
'PORT': '3306', 


El domingo, 6 de enero de 2013 05:42:21 UTC-5, ANKIT BAGARIA escribió:
>
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
> 'mysql', 'sqlite3' or 'oracle'.
> 'NAME': 'django',  # Or path to database file 
> if using sqlite3.
> 'USER': 'name',  # Not used with sqlite3.
> 'PASSWORD': 'pass',  # Not used with sqlite3.
> 'HOST': '/var/run/mysql',   # Set to empty string for 
> localhost. Not used with sqlite3.
> 'PORT': '',  # Set to empty string for 
> default. Not used with sqlite3.
> }
> }
>
>
> this is my setting in settings.py file. I have Mysql server running .Now I 
> run *python manage.py shell *to start python interpreter. Then in the 
> interreter I type the following command *to check the connection to 
> database*:
> >>>from django.db import connection
> >>>cursor = connection.cursor()
>
> and it gives me the *following error*:
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "C:\Python27\lib\site-packages\django\db\backends\__init__.py", 
> line 306,
>  in cursor
> cursor = self.make_debug_cursor(self._cursor())
>   File "C:\Python27\lib\site-packages\django\db\backends\mysql\base.py", 
> line 38
> 7, in _cursor
> self.connection = Database.connect(**kwargs)
>   File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in 
> Connect
> return Connection(*args, **kwargs)
>   File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 187, 
> in __in
> it__
> super(Connection, self).__init__(*args, **kwargs2)
> OperationalError: (2003, "Can't connect to MySQL server on 'localhost' 
> (10061)")
>
> * I am using windows 7.*
> *please help me fix it. it is driving me crazy. I have googled it, gone 
> through different forums but am not able to fix it. Please help me.*
> *thankyou.*
>

-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-01-08 Thread Javier Guerra Giraldez
On Tue, Jan 8, 2013 at 4:04 AM, Diederik van der Boor  wrote:
> When you ask the mysql driver to connect to localhost, it will use the
> socket.
> To avoid this issue, better use 127.0.0.1.

which issue?   what's wrong with using socket?

--
Javier

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-01-08 Thread Diederik van der Boor
The hostname "localhost" has a special meaning for MySQL, at least on Linux it 
has.
When you ask the mysql driver to connect to localhost, it will use the socket.
To avoid this issue, better use 127.0.0.1.

Also check whether the MySQL server is running on that port (netstat -a ?),
whether the service is up (see services panel),
and whether your Windows Firewall allows connections to it.

Greetings,
Diederik

Op 6 jan. 2013, om 18:28 heeft Александр Соколов  
het volgende geschreven:

> Hi! Recently I had the same problem and this site has helped me: 
> http://stackoverflow.com/questions/11121819/mysqldb-in-python-cant-connect-to-mysql-server-on-localhost
> I've set the next properties:
> 'ENGINE': 'django.db.backends.mysql', 
> 'NAME': 'yourdbname',  
> 'USER': 'root',  
> 'PASSWORD': 'your password', 
> 'HOST': '127.0.0.1', 
> 'PORT': '3306', 
> 
> Hope, it will help you.
> 
> P.S. By the way in the beginning, I've installed the latest version of 
> MySQLdb. But this is unlikely has been causing of my problem.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/dFs9n5ZCuDEJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-01-06 Thread Александр Соколов
Hi! Recently I had the same problem and this site has helped 
me: 
http://stackoverflow.com/questions/11121819/mysqldb-in-python-cant-connect-to-mysql-server-on-localhost
I've set the next properties:
'ENGINE': 'django.db.backends.mysql', 
'NAME': 'yourdbname',  
'USER': 'root',  
'PASSWORD': 'your password', 
'HOST': '127.0.0.1', 
'PORT': '3306', 

Hope, it will help you.

P.S. By the way in the beginning, I've installed the latest version of 
MySQLdb. But this is unlikely has been causing of my problem.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/dFs9n5ZCuDEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-01-06 Thread ANKIT BAGARIA

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
'mysql', 'sqlite3' or 'oracle'.
'NAME': 'django',  # Or path to database file 
if using sqlite3.
'USER': 'name',  # Not used with sqlite3.
'PASSWORD': 'pass',  # Not used with sqlite3.
'HOST': '/var/run/mysql',   # Set to empty string for 
localhost. Not used with sqlite3.
'PORT': '',  # Set to empty string for default. 
Not used with sqlite3.
}
}


this is my setting in settings.py file. I have Mysql server running .Now I 
run *python manage.py shell *to start python interpreter. Then in the 
interreter I type the following command *to check the connection to database
*:
>>>from django.db import connection
>>>cursor = connection.cursor()

and it gives me the *following error*:

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python27\lib\site-packages\django\db\backends\__init__.py", line 
306,
 in cursor
cursor = self.make_debug_cursor(self._cursor())
  File "C:\Python27\lib\site-packages\django\db\backends\mysql\base.py", 
line 38
7, in _cursor
self.connection = Database.connect(**kwargs)
  File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in 
Connect
return Connection(*args, **kwargs)
  File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 187, in 
__in
it__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2003, "Can't connect to MySQL server on 'localhost' 
(10061)")

* I am using windows 7.*
*please help me fix it. it is driving me crazy. I have googled it, gone 
through different forums but am not able to fix it. Please help me.*
*thankyou.*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ejeVMh2eIiAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: psycopg2.OperationalError: fe_sendauth: no password supplied

2013-01-01 Thread Bill Freeman
On Tue, Jan 1, 2013 at 12:30 PM, hu mingchun wrote:

> add localhost to host field in settings.py
>
> 在 2009年6月24日星期三UTC+8上午10时09分25秒,Chris Haynes写道:
>>
>> I've just installed postgresql and psycopg2. I supplied a password in
>> the postgres install, but don't know how to supply it to psycopg2:
>>
>>  ~/s/sd$ manage.py syncdb
>> Traceback (most recent call last):
>>   File "./manage.py", line 11, in 
>> execute_manager(settings)
>>   File "/users/home/system/lib/**djangotrunk/django/core/**management/
>> __init__.py", line 347, in execute_manager
>> utility.execute()
>>   File "/users/home/system/lib/**djangotrunk/django/core/**management/
>> __init__.py", line 295, in execute
>> self.fetch_command(subcommand)**.run_from_argv(self.argv)
>>   File "/users/home/system/lib/**djangotrunk/django/core/**management/
>> base.py", line 195, in run_from_argv
>> self.execute(*args, **options.__dict__)
>>   File "/users/home/system/lib/**djangotrunk/django/core/**management/
>> base.py", line 222, in execute
>> output = self.handle(*args, **options)
>>   File "/users/home/system/lib/**djangotrunk/django/core/**management/
>> base.py", line 351, in handle
>> return self.handle_noargs(**options)
>>   File "/users/home/system/lib/**djangotrunk/django/core/**management/
>> commands/syncdb.py", line 48, in handle_noargs
>> cursor = connection.cursor()
>>   File "/users/home/system/lib/**djangotrunk/django/db/**backends/
>> __init__.py", line 62, in cursor
>> cursor = self._cursor(settings)
>>   File "/users/home/system/lib/**djangotrunk/django/db/**backends/
>> postgresql_psycopg2/base.py", line 84, in _cursor
>> self.connection = Database.connect(conn_string, **self.options)
>> psycopg2.OperationalError: fe_sendauth: no password supplied
>
>
It goes in the databases section of settings.py in the password field.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: psycopg2.OperationalError: fe_sendauth: no password supplied

2013-01-01 Thread hu mingchun
add localhost to host field in settings.py

在 2009年6月24日星期三UTC+8上午10时09分25秒,Chris Haynes写道:
>
> I've just installed postgresql and psycopg2. I supplied a password in 
> the postgres install, but don't know how to supply it to psycopg2: 
>
>  ~/s/sd$ manage.py syncdb 
> Traceback (most recent call last): 
>   File "./manage.py", line 11, in  
> execute_manager(settings) 
>   File "/users/home/system/lib/djangotrunk/django/core/management/ 
> __init__.py", line 347, in execute_manager 
> utility.execute() 
>   File "/users/home/system/lib/djangotrunk/django/core/management/ 
> __init__.py", line 295, in execute 
> self.fetch_command(subcommand).run_from_argv(self.argv) 
>   File "/users/home/system/lib/djangotrunk/django/core/management/ 
> base.py", line 195, in run_from_argv 
> self.execute(*args, **options.__dict__) 
>   File "/users/home/system/lib/djangotrunk/django/core/management/ 
> base.py", line 222, in execute 
> output = self.handle(*args, **options) 
>   File "/users/home/system/lib/djangotrunk/django/core/management/ 
> base.py", line 351, in handle 
> return self.handle_noargs(**options) 
>   File "/users/home/system/lib/djangotrunk/django/core/management/ 
> commands/syncdb.py", line 48, in handle_noargs 
> cursor = connection.cursor() 
>   File "/users/home/system/lib/djangotrunk/django/db/backends/ 
> __init__.py", line 62, in cursor 
> cursor = self._cursor(settings) 
>   File "/users/home/system/lib/djangotrunk/django/db/backends/ 
> postgresql_psycopg2/base.py", line 84, in _cursor 
> self.connection = Database.connect(conn_string, **self.options) 
> psycopg2.OperationalError: fe_sendauth: no password supplied

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Twt3-iiL-hYJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Error:psycopg2.OperationalError: FATAL: Peer authentication failed for user "test"

2012-07-21 Thread Juraj Malenica
Hello-

So, I'm a total newbie in Django, and I'm using this tutorial:
http://www.programmersbook.com/page/21/Django-Beginner-Tutorial-Part-I/. I 
got stuck at the 7.th step.

My error is this(I'm a xubuntu user):
Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 443, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 196, in run_from_argv
self.execute(*args, **options.__dict__)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 232, in execute
output = self.handle(*args, **options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 371, in handle
return self.handle_noargs(**options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py",
 
line 57, in handle_noargs
cursor = connection.cursor()
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/__init__.py", 
line 306, in cursor
cursor = self.make_debug_cursor(self._cursor())
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py",
 
line 177, in _cursor
self.connection = Database.connect(**conn_params)
  File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, 
in connect
connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL:  Peer authentication failed for user 
"test"


I found this thread, but it didn't really help me. 
https://groups.google.com/forum/?fromgroups#!topic/django-users/kVpz4Xsmg_E

Please help!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ET-FJTa3Bz0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OperationalError: no connection to the server using Django and gunicorn

2011-07-08 Thread Adrian Ribao
I still have the same problem using gevent with gunicorn, but it works with
synchronous workers.

Did you find a solution?

2011/7/1 Андрей Махнач 

> I'm getting this error randomly
> and it throws 500error to nginx (I'm using nginx+gunicorn)
>
> and it appears really randomly ;)
>
> On Jul 1, 10:16 am, Adrián Ribao Martínez  wrote:
> > I think that the error comes only when starting the server.
> >
> > Reload the page about 10 times and check if you still get the error.
> >
> > Regards,
> >
> > Adrián
> >
> >
> >
> >
> >
> >
> >
> > > Hi Adrian,
> >
> > > Have you solved this weird issue?
> >
> > > if yes, please tell me how.
> >
> > > Best regards,
> > > Andrey Makhnach
> >
> > > On May 27, 12:53 pm, Adrián Ribao  wrote:
> > > > I'm doing it manually because I'm just testing:
> >
> > > > ./manage.py run_gunicorn -c gunicorn.conf.py
> >
> > > > where gunicorn.conf.py
> >
> > > > # -*- coding: utf-8 -*-
> > > > import multiprocessing
> >
> > > > bind = "127.0.0.1:8000"
> > > > workers = multiprocessing.cpu_count() * 2 + 1
> > > > worker_class = 'gevent'
> >
> > > > On 27 mayo, 02:23, Shawn Milochik  wrote:
> >
> > > > > What's the command you're using to run it?
> >
> > > > > Are you in screen? Are you using supervisor or anything like that?
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OperationalError: no connection to the server using Django and gunicorn

2011-07-01 Thread Андрей Махнач
I'm getting this error randomly
and it throws 500error to nginx (I'm using nginx+gunicorn)

and it appears really randomly ;)

On Jul 1, 10:16 am, Adrián Ribao Martínez  wrote:
> I think that the error comes only when starting the server.
>
> Reload the page about 10 times and check if you still get the error.
>
> Regards,
>
> Adrián
>
>
>
>
>
>
>
> > Hi Adrian,
>
> > Have you solved this weird issue?
>
> > if yes, please tell me how.
>
> > Best regards,
> > Andrey Makhnach
>
> > On May 27, 12:53 pm, Adrián Ribao  wrote:
> > > I'm doing it manually because I'm just testing:
>
> > > ./manage.py run_gunicorn -c gunicorn.conf.py
>
> > > where gunicorn.conf.py
>
> > > # -*- coding: utf-8 -*-
> > > import multiprocessing
>
> > > bind = "127.0.0.1:8000"
> > > workers = multiprocessing.cpu_count() * 2 + 1
> > > worker_class = 'gevent'
>
> > > On 27 mayo, 02:23, Shawn Milochik  wrote:
>
> > > > What's the command you're using to run it?
>
> > > > Are you in screen? Are you using supervisor or anything like that?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OperationalError: no connection to the server using Django and gunicorn

2011-07-01 Thread Adrián Ribao Martínez
I think that the error comes only when starting the server.

Reload the page about 10 times and check if you still get the error.

Regards,

Adrián

> Hi Adrian,
> 
> Have you solved this weird issue?
> 
> if yes, please tell me how.
> 
> Best regards,
> Andrey Makhnach
> 
> On May 27, 12:53 pm, Adrián Ribao  wrote:
> > I'm doing it manually because I'm just testing:
> >
> > ./manage.py run_gunicorn -c gunicorn.conf.py
> >
> > where gunicorn.conf.py
> >
> > # -*- coding: utf-8 -*-
> > import multiprocessing
> >
> > bind = "127.0.0.1:8000"
> > workers = multiprocessing.cpu_count() * 2 + 1
> > worker_class = 'gevent'
> >
> > On 27 mayo, 02:23, Shawn Milochik  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > What's the command you're using to run it?
> >
> > > Are you in screen? Are you using supervisor or anything like that?
> 
> 

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OperationalError: no connection to the server using Django and gunicorn

2011-06-30 Thread Андрей Махнач
Hi Adrian,

Have you solved this weird issue?

if yes, please tell me how.

Best regards,
Andrey Makhnach

On May 27, 12:53 pm, Adrián Ribao  wrote:
> I'm doing it manually because I'm just testing:
>
> ./manage.py run_gunicorn -c gunicorn.conf.py
>
> where gunicorn.conf.py
>
> # -*- coding: utf-8 -*-
> import multiprocessing
>
> bind = "127.0.0.1:8000"
> workers = multiprocessing.cpu_count() * 2 + 1
> worker_class = 'gevent'
>
> On 27 mayo, 02:23, Shawn Milochik  wrote:
>
>
>
>
>
>
>
> > What's the command you're using to run it?
>
> > Are you in screen? Are you using supervisor or anything like that?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Intermittent OperationalError on multiple Django servers

2011-06-16 Thread Steven Smith
On two separate Django servers, I'm seeing variations on this error:


 File "/usr/lib64/python2.6/site-packages/django/db/models/sql/
compiler.py", line 731, in execute_sql
   cursor = self.connection.cursor()

 File "/usr/lib64/python2.6/site-packages/django/db/backends/
__init__.py", line 75, in cursor
   cursor = self._cursor()

 File "/usr/lib64/python2.6/site-packages/django/db/backends/
postgresql_psycopg2/base.py", line 136, in _cursor
   self.connection = Database.connect(**conn_params)

OperationalError: could not connect to server: Connection refused
   Is the server running on host "localhost" and accepting
   TCP/IP connections on port 5432?



99% of the time, the user agent is one of the search engines' bots, so
I don't think very many users are seeing it, but it's definitely
affecting my SEO, since, the search engine can't crawl the site. And
it makes me cringe every time I see the error emails...


Anybody have a nudge in the right direction as to where I might start
looking? This is Django 1.2.5 with Postgres 9.0.3, running on a 64-bit
linux system with Apache 2.2.16 and mod_wsgi 3.3.

Thanks!

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OperationalError: no connection to the server using Django and gunicorn

2011-05-27 Thread Adrián Ribao
I'm doing it manually because I'm just testing:

./manage.py run_gunicorn -c gunicorn.conf.py

where gunicorn.conf.py

# -*- coding: utf-8 -*-
import multiprocessing

bind = "127.0.0.1:8000"
workers = multiprocessing.cpu_count() * 2 + 1
worker_class = 'gevent'


On 27 mayo, 02:23, Shawn Milochik  wrote:
> What's the command you're using to run it?
>
> Are you in screen? Are you using supervisor or anything like that?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



  1   2   >