Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 June 14, 2010 17:05:16

W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Arquivo .dat


Hello,

I need to leave a file tabbed, like this:http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.datFollowing piece of my code that does this:

savefig('C:\simuladores\detector\media\imagem.png')
writer = csv.writer(open('C:\simuladores\detector\media
\dados.dat','wb'))
for v1, v2 in pack(f, Sfase):
texto_formato='%f\t\t%f' %(v1,v2)
writer.writerow(texto_formato)

resultado = Fase()

But this error returns:

TypeError at /simulador/

Struct() argument 1 must be string, not xrange

Request Method: POST
Request URL:http://localhost:8000/simulador/Exception Type: TypeError
Exception Value:

Struct() argument 1 must be string, not xrange

Exception Location: C:\simuladores\..\simuladores\detector\views.py
in desenha_grafico, line 158

in my code line 158 is this: for v1, v2 in pack(f, Sfase):

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 14, 2010 19:08:51

Daniel R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Arquivo .dat


On Jun 14, 5:05 pm, Waleria <waleriantu...@gmail.com> wrote:
> Hello,
>
> I need to leave a file tabbed, like this:
>
>http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat>
> Following piece of my code that does this:
>
> savefig('C:\simuladores\detector\media\imagem.png')
> writer = csv.writer(open('C:\simuladores\detector\media
> \dados.dat','wb'))
> for v1, v2 in pack(f, Sfase):
>          texto_formato='%f\t\t%f' %(v1,v2)
>          writer.writerow(texto_formato)
>
> resultado = Fase()
>
> But this error returns:
>
> TypeError at /simulador/
>
> Struct() argument 1 must be string, not xrange
>
> Request Method:         POST
> Request URL:http://localhost:8000/simulador/> Exception Type:         TypeError
> Exception Value:
>
> Struct() argument 1 must be string, not xrange
>
> Exception Location:     C:\simuladores\..\simuladores\detector\views.py
> in desenha_grafico, line 158
>
> in my code line 158 is this: for v1, v2 in pack(f, Sfase):

What are f and Sfase, and why are you using Struct.pack (and why
haven't you read the documentation for it)?
--
DR.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 June 14, 2010 19:21:57

W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Arquivo .dat


look my code:http://paste.pocoo.org/show/225383/f is f = xrange(3000,3400)
and Sfase are the values of function ......for each value of "f"
against a value for "Sfase"

Dou you understand?

On 14 jun, 15:08, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Jun 14, 5:05 pm, Waleria <waleriantu...@gmail.com> wrote:
>
>
>
> > Hello,
>
> > I need to leave a file tabbed, like this:
>
> >http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat>
> > Following piece of my code that does this:
>
> > savefig('C:\simuladores\detector\media\imagem.png')
> > writer = csv.writer(open('C:\simuladores\detector\media
> > \dados.dat','wb'))
> > for v1, v2 in pack(f, Sfase):
> >          texto_formato='%f\t\t%f' %(v1,v2)
> >          writer.writerow(texto_formato)
>
> > resultado = Fase()
>
> > But this error returns:
>
> > TypeError at /simulador/
>
> > Struct() argument 1 must be string, not xrange
>
> > Request Method:         POST
> > Request URL:http://localhost:8000/simulador/> > Exception Type:         TypeError
> > Exception Value:
>
> > Struct() argument 1 must be string, not xrange
>
> > Exception Location:     C:\simuladores\..\simuladores\detector\views.py
> > in desenha_grafico, line 158
>
> > in my code line 158 is this: for v1, v2 in pack(f, Sfase):
>
> What are f and Sfase, and why are you using Struct.pack (and why
> haven't you read the documentation for it)?
> --
> DR.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 June 14, 2010 19:45:49

W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Arquivo .dat


I need to save the values of f in a columm and the values of Sfase in
a other columm ....for de exemple:http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.datOn 14 jun, 15:20, Waleria <waleriantu...@gmail.com> wrote:
> look my code:http://paste.pocoo.org/show/225383/>
> f is f = xrange(3000,3400)
> and Sfase are the values of function ......for each value of "f"
> against a value for "Sfase"
>
> Dou you understand?
>
> On 14 jun, 15:08, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
> > On Jun 14, 5:05 pm, Waleria <waleriantu...@gmail.com> wrote:
>
> > > Hello,
>
> > > I need to leave a file tabbed, like this:
>
> > >http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat>
> > > Following piece of my code that does this:
>
> > > savefig('C:\simuladores\detector\media\imagem.png')
> > > writer = csv.writer(open('C:\simuladores\detector\media
> > > \dados.dat','wb'))
> > > for v1, v2 in pack(f, Sfase):
> > >          texto_formato='%f\t\t%f' %(v1,v2)
> > >          writer.writerow(texto_formato)
>
> > > resultado = Fase()
>
> > > But this error returns:
>
> > > TypeError at /simulador/
>
> > > Struct() argument 1 must be string, not xrange
>
> > > Request Method:         POST
> > > Request URL:http://localhost:8000/simulador/> > > Exception Type:         TypeError
> > > Exception Value:
>
> > > Struct() argument 1 must be string, not xrange
>
> > > Exception Location:     C:\simuladores\..\simuladores\detector\views.py
> > > in desenha_grafico, line 158
>
> > > in my code line 158 is this: for v1, v2 in pack(f, Sfase):
>
> > What are f and Sfase, and why are you using Struct.pack (and why
> > haven't you read the documentation for it)?
> > --
> > DR.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 June 15, 2010 13:15:20

W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Arquivo .dat


can anyone help me?

On 14 jun, 15:45, Waleria <waleriantu...@gmail.com> wrote:
> I need to save the values of f in a columm and the values of Sfase in
> a other columm ....for de
> exemple:http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat>
> On 14 jun, 15:20, Waleria <waleriantu...@gmail.com> wrote:
>
> > look my code:http://paste.pocoo.org/show/225383/>
> > f is f = xrange(3000,3400)
> > and Sfase are the values of function ......for each value of "f"
> > against a value for "Sfase"
>
> > Dou you understand?
>
> > On 14 jun, 15:08, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
> > > On Jun 14, 5:05 pm, Waleria <waleriantu...@gmail.com> wrote:
>
> > > > Hello,
>
> > > > I need to leave a file tabbed, like this:
>
> > > >http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat>
> > > > Following piece of my code that does this:
>
> > > > savefig('C:\simuladores\detector\media\imagem.png')
> > > > writer = csv.writer(open('C:\simuladores\detector\media
> > > > \dados.dat','wb'))
> > > > for v1, v2 in pack(f, Sfase):
> > > >          texto_formato='%f\t\t%f' %(v1,v2)
> > > >          writer.writerow(texto_formato)
>
> > > > resultado = Fase()
>
> > > > But this error returns:
>
> > > > TypeError at /simulador/
>
> > > > Struct() argument 1 must be string, not xrange
>
> > > > Request Method:         POST
> > > > Request URL:http://localhost:8000/simulador/> > > > Exception Type:         TypeError
> > > > Exception Value:
>
> > > > Struct() argument 1 must be string, not xrange
>
> > > > Exception Location:     C:\simuladores\..\simuladores\detector\views.py
> > > > in desenha_grafico, line 158
>
> > > > in my code line 158 is this: for v1, v2 in pack(f, Sfase):
>
> > > What are f and Sfase, and why are you using Struct.pack (and why
> > > haven't you read the documentation for it)?
> > > --
> > > DR.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 15th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support