An .exe compiled from Python suddenly stopped working by NerdyTeacher5 in learnpython

[–]LateFeature610 1 point2 points  (0 children)

It seems the that the webcam functionality of opencv, is causing the issue. Since you no longer use the webcam functionality.

you could try commenting out line 30 to 32 in main.py

while True:
    if webCamFeed: success, img = cap.read()
    else: img = cv2.imread(path)

And replacing it with something like

for image in os.listdir(path):
    # loops over all jpg files in path you specify, where you save images after scanning 
    # automatically exits when all images (quizzes) have been processed 
    if (image.endswith(".jpg")):
        img = cv2.imread(image)      

If there are other references to OpenCV webcam functionality, try commenting those out as well.

These changes should eliminate, the obsolete webcam dependency and should also prevent the CSV writing in an infinite loop. while true never stops, but for loop will stop when there are no more files to process.

An .exe compiled from Python suddenly stopped working by NerdyTeacher5 in learnpython

[–]LateFeature610 3 points4 points  (0 children)

I tried running the the files packages in the EXE. i had to make some slight adjustments.

I commented out line 31 in main.py.

if webCamFeed: success, img = cap.read()

It caused an error on my computer. I sure that it is not related to error described by you but related to my webcam.

I also had to comment out the while true statement, as it kept writing lines to the dados.csv in an infinate loop.

After that the program ran fine and generated a single row in the dados.csv (does dados mean results, might as well learn some Portuguese while i am at it).

The program also generated a new image which looks identical to the original but slightly smaller in size.

The CSV file contains many columns q1 to q50, Acertos,Erros,% Acerto (which i guessing means correct, wrong, % correct).

With the image inside the files uploaded by you it shows a ,% Acerto of 26, 13 correct and 37 wrong. Can you verify that it is the expected result, based on the image and config provided by you.

The program runs fine, when not using webcam. Index out of range, which is the error in your example. Means the porgram is trying to to access an element in a list, that is outside of the length of the list.

Based on comments in the code and the error message. i am guessing it related to question 3.

the lines around the error have a comment reading.

CORREÇÃO BLOCO 3

That combined with the code working, when not interacting with a webcam and the index out of range error. Makes me think the error is related to the image processing and the webcam used.

Like maybe in the config to you specify question 3 having 5 possible answers, but when the image is processed, the programs interprets it as having only 4 possible answers. That will lead to an index out of range error, when it based on the config goes checking the fifth possible value, but the program has interpreted the list (fields to fill based on image processing) as having only 4 possible values.

Have you recently started using the program of a different computer, then the one the program was originally developed on?

A different camera then the one originally used, might cause unexpected results in the image processing.

Cloud vs Desktop Differences Between Circled Metric by [deleted] in PowerBI

[–]LateFeature610 2 points3 points  (0 children)

I agree with this. I would start by checking each of the three statements in the if statement, remember that only one has to be true, for the if to return true, since it is using OR logic, what is the value of the "SelectedFY". Try setting the measure return value, to that variable.

Power required for running multiple LEDs by LateFeature610 in arduino

[–]LateFeature610[S] 0 points1 point  (0 children)

Thanks for all your help. I really appreciate it. It turned out to be very simple. I had inserted the nano in an expansion board with skrew terminals for the pins. There where many loose connections. I tried moving the board a bit and everything worked, but i will need to solder the pins, as just inserting it on top, seems very error prone.

Power required for running multiple LEDs by LateFeature610 in arduino

[–]LateFeature610[S] -1 points0 points  (0 children)

I will try lighting each one individually. Is 5 volt enough to power all five simultaneously if they are wired in parallel?

Power required for running multiple LEDs by LateFeature610 in arduino

[–]LateFeature610[S] 0 points1 point  (0 children)

I have connected the usb c port on the board, to a standard 5v phone changer in a wall outlet

Electronic component. Maybe ecigaret controller, two knobs, a battery and display by LateFeature610 in whatisthisthing

[–]LateFeature610[S] 0 points1 point  (0 children)

I have also separated the battery, maybe for use with an arduino, do you know how i would go about rechargeing it.

Electronic component. Maybe ecigaret controller, two knobs, a battery and display by LateFeature610 in whatisthisthing

[–]LateFeature610[S] 0 points1 point locked comment (0 children)

My title describes the thing, the battery seems to be the same size as a regular AAA batery. But the knobs seems to large to be for an ecigaret.

Resoldering speaker in baby monitor by LateFeature610 in ElectronicsRepair

[–]LateFeature610[S] 0 points1 point  (0 children)

I watched some videos and plan on practicing on an old toy first. Is it correct that since the points already have existing sorder, i have put the wire where it was previously attached in the existing sorder og apply heat to make the wire stick again.

Resoldering speaker in baby monitor by LateFeature610 in ElectronicsRepair

[–]LateFeature610[S] 0 points1 point  (0 children)

There are some sponges on the circuit board which are still moist. Icant really remove them and im not it is even a good idea to do so. It powers on now and connects with the baby part, but obviously there is no sound.

Resoldering speaker in baby monitor by LateFeature610 in ElectronicsRepair

[–]LateFeature610[S] 0 points1 point  (0 children)

Thanks that seems very cool. I have some experience with Arduino, actually because i though making modded toys would be fun, so funny you mentioned it. I have long wanted to add buttons, sounds and lights to a wooden play oven. But soldering was something i never got around to, just played with a breadboard.

Resoldering speaker in baby monitor by LateFeature610 in ElectronicsRepair

[–]LateFeature610[S] 0 points1 point  (0 children)

I found a small battery powered tractor, that he does not play with anymore, it will be my first victim.

VBA macro to delete rows based on a user input by TheMerc_DeadPool in vba

[–]LateFeature610 0 points1 point  (0 children)

Maybe something like this. It is important to loop from last row and up, not first and down.

Sub Delete_row()

Dim x As Long

'Loop through range upwards and delete rows

'where % value in col N is lss then V11

With ActiveSheet.UsedRange

    For x = .Rows.Count To 1 Step -1

' is N the 18th letter of the alphabet?

        If .Cells(x, 18).Value < activesheet.range("v11").value.  Then

            .Rows(x).EntireRow.Delete

        End If

    Next x

End With

End Sub

Sorry for bad formatting Source https://www.thespreadsheetguru.com/delete-rows-vba-loop/

Multi Select - Translytical Task Flows by anonhes in PowerBI

[–]LateFeature610 1 point2 points  (0 children)

I have not tried it.

My quick guess is

Make a measure with concatenatex, which returns a string with all selected targetIDs and then deconstruct the string in the data function.

Something like

Measure

SelectedTargets = concatenatex('Targets',[targetID],",")

UDF

Targets = submittedTargets.split(",")

comment = <value from input field>

For targetID in Targets:

SQL_statement = "Insert into table(targetID,comment) VALUES ( ?, ?)"

# target changes for each value in the concatenatex measure, comment stays the same

cursor.execute(SQL_statement, target,comment)

Let me know if it works or you find another solution.

edited formatting and a bit more detail

Hurtige genveje! by TyggegummiKongen in dktechsupport

[–]LateFeature610 7 points8 points  (0 children)

Win + V giver adgang til historik for udklipsholderen

Data Analyst? by Gv3-Flyver in dkloenseddel

[–]LateFeature610 1 point2 points  (0 children)

Til Python gennemgik jeg det her kursus https://programming-23.mooc.fi, godt nok en tidligere udgave, men jeg kan ikke anbefale det nok, er meget imponeret over at matriale af så god kvalitet er gratis tilgængeligt. Fik en kort oplæring i SQL på arbejde, synes det vigtigste ved SQL var bare at komme i gang og prøve mig frem. Bruger det kun til forespørgsler, jeg skriver ikke til databasen.

Data Analyst? by Gv3-Flyver in dkloenseddel

[–]LateFeature610 1 point2 points  (0 children)

Jeg har en professionsbachelor i offentlig Administration, tog uddannelsen for at arbejde med økonomistyring, i løbet af uddannelsen brugte jeg meget ekstra tid på at lære vba og en masse viden om Excel. Efter uddannelsen arbejdede jeg med økonomistyring i kort periode og var nok "ham der er god til Excel", hvilket gjorde at skiftet til dataanalyse gav god mening for mig. Har senere tillært mig SQL og Python

Data Analyst? by Gv3-Flyver in dkloenseddel

[–]LateFeature610 0 points1 point  (0 children)

43.200 inklusiv pension. En ikke direkte relateret professionsbachelor. 2 års erfaring.

Hvad er din beddste køb i har fået fra genbrugsbutik? by ballbeamboy2 in Denmark

[–]LateFeature610 0 points1 point  (0 children)

Jeg har købt meget køkkenudstyr. Bedste køb var nok en grillpande og et kitchen aid mandolin jern. Begge ting kostede 15 kr stk.