Non-developer problems

28 views
Skip to first unread message

Stuart Parker

unread,
Sep 27, 2012, 10:35:06 AM9/27/12
to humanio...@googlegroups.com
Hi folks,

Non developer here looking at ways to introduce coding to various audiences. 

I have inputted my dev ID and key but keep getting the same "You must specify your developer information in..." message when I try to run the helloworld.py example.

Any clues would be greatly appreciated

Thanks

Stuart

Lawrence Kesteloot

unread,
Sep 27, 2012, 12:10:06 PM9/27/12
to humanio...@googlegroups.com
Hi Stuart,

The "You must specify your developer information..." message comes
from the my_humanio_auth.py. It's only printed if the information was
not put in those two variables (developer_id and secret_key). Where
did you put your dev ID and key?

Lawrence
> --
> You received this message because you are subscribed to the Google Groups
> "humanio-discuss" group.
> To post to this group, send email to humanio...@googlegroups.com.
> To unsubscribe from this group, send email to
> humanio-discu...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/humanio-discuss/-/kc9CL8RvxeYJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Guy Mann

unread,
Sep 27, 2012, 7:46:48 PM9/27/12
to humanio...@googlegroups.com
Did you leave the original lines in place and paste your developer id and key above?
If so you will need to comment out the lines below which are overwriting your variables.
Comment them out by putting a # at the start of their text.

Stuart Parker

unread,
Sep 28, 2012, 4:04:04 AM9/28/12
to humanio...@googlegroups.com
Hi Lawrence, here's what i've got - i'm pretty sure it's not wrong but it's come down to this!

developer_id = "my developer id"
secret_key = "my secret key"

if developer_id == "my developer id":
    import sys
    print "You must specify your developer information in " + __file__
    sys.exit(1)

The only thing I can think of is that I have the 2 codes the wrong way round - but I thought I was pretty thorough in that respect.

Stuart Parker

unread,
Sep 28, 2012, 4:16:39 AM9/28/12
to humanio...@googlegroups.com
** SUSSED ** After using new codes / account

I was putting the developer ID into that 3rd line also - as it does state "my developer id" - upon checking out what "==" means, I tried leaving that line and it worked.

However, I thought i'd tried changing this before. Is there a chance that doing it wrong 1st time round means it's not possible to alter it later?

Thanks both for input :)

Paul Scott

unread,
Sep 28, 2012, 4:53:08 AM9/28/12
to humanio...@googlegroups.com
On 28/09/2012 10:04, Stuart Parker wrote:
Hi Lawrence, here's what i've got - i'm pretty sure it's not wrong but it's come down to this!

developer_id = "my developer id"
secret_key = "my secret key"

if developer_id == "my developer id":
    import sys
    print "You must specify your developer information in " + __file__
    sys.exit(1)


Stuart,

A pro tip (from a marine botanist that now writes software for a living - self taught), read the code as English. If it doesn't make sense it is probably wrong.

Remember that in Python, indentation is significant, so read those indented lines as a paragraph. If the paragraph "header" has little to do with the paragraph, it probably is wrong in some way.

With that in mind, lets take a look at your code:


developer_id = "my developer id"
secret_key = "my secret key"

According to the docs, these things should be changed to your specific variables (in a different file in the examples, but this will work too)


if developer_id == "my developer id":

Read this as English - 'if the variable developer id is "my developer id" then do the following:'

so we can see that already everything below that and indented will be ignored since you have changed "my developer id" to your actual developer id right? ;)

That then means that your code is the wrong way around. 

Lets change it around a bit for you then:

developer_id = "id1234"
secret_key = "s7890"

if developer_id == "my developer id":
    print "Oops, you forgot to set your key!"
    sys.exit(1)

else:
    import sys
    print "Al clear, lets start the code of my actual programme now!"
    # Carry on now with the rest of your code...
    ...
    ...


Hope this clears up some confusion for you at least!

Also, read the docs on python.org and dive into python as a starting point. They are really useful resources and I do believe that there is still a "Python for non-programmers" doc as well.

-- Paul

Stuart Parker

unread,
Sep 28, 2012, 7:21:43 AM9/28/12
to humanio...@googlegroups.com
Cheers Paul,

have dabbled with bits and bobs of code but I need to be doing stuff regularly for it to stick with me! Now looking at the example scripts to help me understand and, like you say, check out other python tutorials to help further.

In terms of a language we're looking at to use to help us code, python seems to be the leader right now.

:)
Reply all
Reply to author
Forward
0 new messages