[Tutor] Hello!

2016-09-09 Thread Eric Gardner
I don't know if i'm sending the email to the right address but here it
goes!. Would Python be a suitable language for first time learners like me?

-- 
Eric G
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Hello!

2016-09-09 Thread Alan Gauld via Tutor
On 09/09/16 17:21, Eric Gardner wrote:
> I don't know if i'm sending the email to the right address but here it
> goes!. Would Python be a suitable language for first time learners like me?

Yes, this is the right address, welcome.

And yes, Python is an excellent language with which to learn
programming. If you are comfortable with basic computer use
you can try my tutorial(see below) or there is a whole
web page on the Python site dedicated to new programmers:

http://wiki.python.org/moin/BeginnersGuide/NonProgrammers



-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Hello!

2016-09-09 Thread Joaquin Alzola

> I don't know if i'm sending the email to the right address but here it goes!. 
> Would Python be a suitable language for first time learners like me?

I suppose it depends on each one but from my experience I try with C and then 
Java without finding the feeling for it ...

Then I learn python over a year ago and I can tell you that it is one of the 
best for first timers.

I am now learning Java and it is much easier after somehow controlling python.

(I suppose ruby has to be the same that python).

--
Joaquin
This email is confidential and may be subject to privilege. If you are not the 
intended recipient, please do not copy or disclose its content but contact the 
sender immediately upon receipt.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Error: 'IndexedVar' object is not callable

2016-09-09 Thread Pooja Bhalode
Hi everyone,

I was getting this error which read ' 'IndexedVar' object is not callable '
for a variable type.

The variable is defined as a class variable and has dimensions m.C(i,j) in
z and t axis.

The program isnt able to take in any of the equations that I am giving it
to because of this error. I looked up online, and it said that maybe the
variable is being used up somewhere else, also tried changing the name but
it didn't help.

Could someone please tell me the possible reasons for this happening.

ERROR: Rule failed when generating expression for constraint concentration
with index (10, 10):
TypeError: 'IndexedVar' object is not callable
ERROR: Constructing component 'concentration' from data=None failed:
TypeError: 'IndexedVar' object is not callable


I would appreciate it.
Thank you
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Error: 'IndexedVar' object is not callable

2016-09-09 Thread Alan Gauld via Tutor
On 09/09/16 19:50, Pooja Bhalode wrote:

> I was getting this error which read ' 'IndexedVar' object is not callable '
> for a variable type.

Python error messages are very informative, but only if we can see them.
Please post the entire error message not just a summary.

> The variable is defined as a class variable and has dimensions m.C(i,j) in
> z and t axis.

Python variables are just names that reference objects,
so variables do not have any type per se, rather they
take the type of whatever they are currently referencing.

> Could someone please tell me the possible reasons for this happening.

"not callable" means that you are trying to call the variable
(using parens (...) ) on a variable that is not callable, in
this case an IndexedVar - whatever that is; it's not part
of the standard Python language so you are presumably using
some kind of third party add-on, (possibly SciPy?). It will
help if you tell us which libraries you are using. Anyway,
its most likely that you have assigned a variable to something
you expected to be a callable but is in fact an IndexedVar.
This could, for example, be the parameter of a function and
you have passed in the wrong kind of data, or it could
be the return value from a function that you assign to your variable.

> ERROR: Rule failed when generating expression for constraint concentration
> with index (10, 10):
> TypeError: 'IndexedVar' object is not callable
> ERROR: Constructing component 'concentration' from data=None failed:
> TypeError: 'IndexedVar' object is not callable

Those don't look like Python error messages. How are you
running this code? If it is an IDE then it may be
contributing to the confusion.

Also we can only guess what your code looks like.
Please post the code causing the error. As a minimum
the function/method involved. If possible all of it
(if less than ~100 lines?).

And please post the entire error message, plus a note of
your Python version and whatever library you are using.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Error: 'IndexedVar' object is not callable

2016-09-09 Thread Alex Kleider

On 2016-09-09 11:50, Pooja Bhalode wrote:

Hi everyone,

I was getting this error which read ' 'IndexedVar' object is not 
callable '

for a variable type.


You haven't provided much information but it seems to me you are calling 
IndexedVar as though it were a function but it probably isn't a 
function.


some_name(zero_or_more_parameters)

is a function call, calling some_name.

If some_name hasn't been defined as a function:
def some_name():
  do something

then you can expect the error you got.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Error: 'IndexedVar' object is not callable

2016-09-09 Thread Steven D'Aprano
Hi Pooja, and welcome!


On Fri, Sep 09, 2016 at 02:50:57PM -0400, Pooja Bhalode wrote:
> Hi everyone,
> 
> I was getting this error which read ' 'IndexedVar' object is not callable '
> for a variable type.
> 
> The variable is defined as a class variable and has dimensions m.C(i,j) in
> z and t axis.

I'm afraid I have no idea what you are talking about here. What is an 
IndexedVar object? What does "dimensions m.C(i,j) in z and t axis" mean?

Is this from some third-party library? Which one?

I would help if you show us the actual code you are trying to run. Not 
your entire application, especially if it is big, but enough of the code 
that we can understand the context. Please read this article first for 
how you can improve the chances of getting good answers to your 
questions:

http://sscce.org/

> ERROR: Rule failed when generating expression for constraint concentration
> with index (10, 10):
> TypeError: 'IndexedVar' object is not callable
> ERROR: Constructing component 'concentration' from data=None failed:
> TypeError: 'IndexedVar' object is not callable


These do not look like standard Python errors. I would expect to see a 
traceback, which may look something like this:

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.3/random.py", line 298, in sample
raise TypeError("Population must be a sequence or set.  For dicts, use 
list(d).")
TypeError: Population must be a sequence or set.  For dicts, use list(d).


How are you running this code?

My *wild-guess* is that if you change m.C(i, j) to m.C[i, j] it might 
fix this specific error, but it really is a guess.


-- 
Steve
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Error: 'IndexedVar' object is not callable

2016-09-09 Thread Alex Kleider

On 2016-09-09 18:13, Steven D'Aprano wrote:

Please read this article first for
how you can improve the chances of getting good answers to your
questions:

http://sscce.org/


In addition to the link Seven provides above, I've also found the 
following to be worth perusing:

http://www.catb.org/esr/faqs/smart-questions.html
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor