« first day (3596 days earlier)      last day (1353 days later) » 
00:00 - 19:0019:00 - 23:00

7:01 PM
@Kevin, Ha
 
we don't laugh, we cry :'|
 
@AndrasDeak, Ha
 
@Linux4Life531 From that, I've found this and this
Have you seen those? I'm having a tough time trying to contextualise the problem so; do they help?
 
"returned NULL without setting an error" appears to be a generic error that occurs whenever a Python function defined in C does not return a PyObject instance like it's supposed to.
Basically all it tells us is that something went wrong in a way that was not foreseen by the person writing the C function
The second link that roganjosh posted looks promising.
 
@Kevin Ok, well, I made pause to the frenetic posting, so I'm happy to pass over to you since you know more about this :P
 
7:07 PM
Basically we've looped back around to my original suggestion of "one of the arguments is probably wrong"
 
But really, I think this is a poop traceback. I'm struggling to read the issue (not the fault of the messenger)
 
I would triple check the values of lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7 to make sure they actually correspond to lcds that actually exist on the hardware
@roganjosh Yeah, I wish Python's traceback printer was smart enough to notice line continuations
It would be nice to see the entire statement at least
 
I've heard about the issue in RPis that there are multiple numbering conventions for pins, and it's easy to use the wrong one.
 
@Linux4Life531 high school with indian syllabus sucks, very poor curriculum abt python but doe der is a little foundation to ML with numpy pandas and matplotlib
 
@CoolCloud, I know. Started programming in UK year 4 in high school now ;)
 
7:13 PM
anywho, I wonder what's wrong with that LED code :)
I guess I should look at the actual code
 
@Kevin, the second one is my issue, but it is still not helpful.
 
I don't think I can see any directives that change the pin numbering
 
Earlier in my char_lcd.py I have this:
# Raspberry Pi pin configuration:
lcd_rs        = 14  # Note this might need to be changed to 21 for older revision Pi's.
lcd_en        = 17
lcd_d4        = 27
lcd_d5        = 18
lcd_d6        = 23
lcd_d7        = 26
lcd_backlight = 24
And then
lcd = LCD.Adafruit_CharLCD(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7,
                           lcd_columns, lcd_rows)
 
GPIO.setmode(GPIO.BOARD) vs GPIO.setmode(GPIO.BCM) what I saw for RPis
 
I wonder if there's some way to test the lcds one at a time to figure out if any specific lcd is causing the problem
Having never worked with an RPi personally, I wouldn't know
 
7:18 PM
This could be helpful
class Adafruit_CharLCD(object):
    """Class to represent and interact with an HD44780 character LCD display."""

    def __init__(self, rs, en, d4, d5, d6, d7, cols, lines, backlight=None,
                    invert_polarity=True,
                    enable_pwm=False,
                    gpio=GPIO.get_platform_gpio(),
                    pwm=PWM.get_platform_pwm(),
                    initial_backlight=1.0):
 
@Linux4Life531 when did they start programming? at which grade
 
This might be obvious, but it's probably worth changing lcd_rs to 21 to see if that fixes things
 
The us version is Grade 3.
@Kevin, Good idea, but no.
 
πŸ‘
 
The variables match my wiring. But the error is software side.
I tried setting the like the following as recommended in github.com/adafruit/adafruit-beaglebone-io-python/blob/master/…, but did not work
# Raspberry Pi pin configuration:
lcd_rs        = "GPIO0_14"  # Note this might need to be changed to 21 for older revision Pi's.
lcd_en        = "GPIO0_17"
lcd_d4        = "GPIO0_27"
lcd_d5        = "GPIO0_18"
lcd_d6        = "GPIO0_23"
lcd_d7        = "GPIO0_26"
lcd_backlight = "GPIO0_24"
 
7:25 PM
I wish I could look at the C implementation of setup but I don't know where it is or if it's even public
 
@Kevin, I do not know of one... :(
 
I have got to go now, sorry to leave you hanging. I will check back tommorow for any updates or solutions. Sorry...
 
Had a few comments back and forth with @BuvinJ about code signing PyInstaller executables. They said said "there are significant security holes in [PyInstaller], which trump [code signing]". Anyone know what they might be referring to, or where I might read more on this?
 
@Linux4Life531 no worries, chat is asynchronous. We can ping you and you can ping us when there's something new
 
7:30 PM
@Linux4Life531 I think you've stumped us. Nice work :)
 
@AndrasDeak Quite possibly, yes. So we're looking for any return NULL;s that don't have a corresponding PyErr_SetString call...
if (err != BBIO_OK) \n\t return NULL; is suspect #1
 
or does the arg tuple parsing not need it?
 
My crystal ball suggests that PyArg_ParseTupleAndKeywords sets the error string on your behalf. I have zero evidence of this.
github.com/adafruit/adafruit-beaglebone-io-python/blob/… appears to be a list of all legal pin names. I think I must have missed something during my source dive because I don't see how you can refer to pins by number, as the original code does with e.g. lcd_rs = 14
 
how long have u guys been into python for
 
I probably started around the time I first joined this room, so 2011-09-21
 
7:40 PM
woah, 9 years damn?im pretty sure i cant stay concentrated for that long
 
5 years and 4 months, SO tells me
 
anything > 3 or 4 yrs is great commitment
 
That's probably why newbies get frustrated when they ask "how do I become like you?" and I reply "just mess around with cool projects for a decade"
They're probably looking for something with a faster return on investment
 
well its true, there is no shortcuts to success :D
 
just set your internal clock forward by 10 years, problem solved
 
7:43 PM
@Aran-Fey ha, modern probs, require modern solutions duh
 
I don't feel like it required any concentration or commitment on my part. If anything, it's my lack of both of those things that let my idle brain absorb information from the ambient environment
 
lol hopefully i can hold on to python for a long time
 
When I was a C# developer around 2010 I remember being very confused at how anyone could program effectively with dynamic typing and whitespace for scope. I couldn't comprehend it. But it intrigued me and now I have been a Python developer since 2015!
 
@M.Dudley thats greatt!!
 
github.com/metachris/RPIO/blob/… can get the pin from an int, but it's a completely different and unmaintained project so who knows if it has any bearing here
I was at least hoping to find a table of structs with some useful information, for example human-readable names, but pin_to_gpio and its inverse are just integer arrays. So much for that.
 
8:05 PM
@CoolCloud I don't see it as a commitment. I studied engineering for longer than that and I find programming massively more rewarding for me. If you find yourself forcing your learning then that's not a good sign
 
@CoolCloud 2004/5 I think...
 
@roganjosh i dint mean as a forcing, i cant stay concentrated to anything(its facts abt me)
@JonClements damn almost as old as me
 
@CoolCloud Well, programming gives you a fantastic playground to work with. But it's not the be-all-and-end-all. There are other outlets for people to be creative
 
PM occasionally tells stories from, like, Python 2.3. Which explains his high power level.
 
8:20 PM
@roganjosh ha yes, true
 
@CoolCloud 25 years now!
 
18 for me. I guess that makes me an adult in Python years.
 
@PaulMcG lol true
@holdenweb wow older than meπŸ˜‚
 
programming for 3 years 8 months and python for 2 years 8 months
 
Where's the lost year? :)
 
8:25 PM
R
 
I'd been programming almost 30 years before I started using Python ... had to wait for it to be invented!
 
@Dodge I tried.... and nope
 
@holdenweb haha, that's awesome
 
I also fiddled around with SAS for a bit but, also nope
 
@roganjosh If it was not for R and R Studio I would probably have never learned to program, great gateway language IMHO
 
8:28 PM
@roganjosh really? I did SAS for 5 years :)
 
@JonClements It just didn't fit my mental model at all, but I could get the whole thing for free with my uni login
 
you have my condolences Jon, from what I learned just not really a fan
one of my grad courses focused on teaching that so we were familiar but ill admit i dont mind not touching it again
 
@Skyler for the tasks required, it worked absolutely fine. Don't see myself ever having to use it again now though
 
yea, its pretty decent for a specialized use case but these days its only around because its been around so long
 
I managed to pull some Pearson correlations out of it. Then kicked it to the curb and forgot about it
 
8:39 PM
can some one in simple words explain what __init__ the leading _ is and why is __main__ and all spcl?
 
@CoolCloud just an observation, but "spcl" and "abt" don't come across very well when you're asking for technical advice. At least to me. I'm guilty of using things like "tbh" but that's not just stripping out vowels
 
@roganjosh that was just cuz this was chats, or ill be super formalπŸ˜‚
 
Only an observation. Carry on.
 
still waiting for an simple breifing πŸ˜‚πŸ˜Œ
 
8:56 PM
I'm not sure what briefing I'm supposed to be giving
 
@roganjosh maybe i can watch a video for that, but why do we say self as the parameter each time
 
technically it doesnt have to be self
 
@roganjosh thanks for that :D
@Skyler oh, then?
 
9:13 PM
@CoolCloud please take the time to read our rules. There's a line there that asks not to use txtspk and the like.
 
@AndrasDeak sure, will be carefull next time
 
@roganjosh I tend to treat proper abbreviations (especially internet lore such as "lol") differently in my head
 
10:12 PM
yo guys how u doin? :D
got a quick question: I know I can use brackets to select keys on a dictionary like a['key'] and also know I can select list elements using them like myList[1]. OK
what I need to know is: when using numpy, is there another type of usage for this bracket notation, different from those I just mentioned?
 
@PedroSpinola I don't understand the question
 
(I'm reading differential_evolution source code and trying to understand it)
if I have a np.array
 
numpy arrays implement their custom __getitem__ so yeah, some things are valid numpy indices when they aren't valid list indices
 
can I select stuff inside it using brackets
but not using single integer?
 
you can use tuples as indices in multidimensional arrays, and you can pass sequences as indices which is called advanced indexing
 
10:15 PM
something like my_array[[0,1]] or anything similar to that?
ohhh I see
there it is
 
@PedroSpinola using a single integer also works
 
thanks mate!
I'll take a look at it
 
@PedroSpinola - using brackets to slice up a nparray has many flavors and nuances, that will drive you crazy just doing trial-and-error. You must read the docs on this.
 
I'm afraid Pedro is 7 levels too deep for that
 
10:18 PM
@PaulMcG I'm not writing code with it. Just trying to understand a scipy solver source code that uses this
I was so confused lol
 
reading scipy solver code won't make you any less confused
 
I was confused about indexing because I didn't know about advanced indexing
but now it's fine :)
We took around 6 hours to do it, but I think I have a pretty good understanding of how it works now :D Particularly the strategies
 
I appreciate. Have a nice one! gtg bye
 
bye
 
00:00 - 19:0019:00 - 23:00

« first day (3596 days earlier)      last day (1353 days later) »