Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: model.fit and model.predict errors
Post: RE: model.fit and model.predict errors

expected shape=(None, 150, 150, 3), found shape=(None, 499, 381, 3) What it is telling us is that the resize is not happening correctly. This line img.resize((150,150)) needs to be img = img.resize...
popejose General Coding Help 6 1,193 Nov-08-2023, 12:57 PM
    Thread: problem using pyeval_expression
Post: RE: problem using pyeval_expression

Maybe this one? Name is similar but not exact. On PyPi. pip install py-expression-eval /regards
popejose General Coding Help 5 634 Oct-30-2023, 02:30 PM
    Thread: problem in using input command
Post: RE: problem in using input command

Also noteworthy that techcruch.csv appears to be a typo. /regards
popejose General Coding Help 4 1,000 Oct-19-2023, 03:27 PM
    Thread: [SOLVED] [loop] Exclude ranges in… range?
Post: RE: [loop] Exclude ranges in… range?

Something like this maybe: my_ranges = [range(1, 10), range(25, 30), range(35, 41)] exclude = [1, 2, 3, 4, 5] for r in my_ranges: for i in r: if i not in exclude: print(i)/re...
popejose General Coding Help 2 1,367 May-14-2023, 03:14 PM
    Thread: point of sale code problem
Post: RE: point of sale code problem

There are 3 things preventing the code from running as it is. Some of the best hints to your problems will come from the errors python gives you. ex. Error:TypeError: CalculatePrice() missing 2 requi...
popejose Homework 3 1,279 Dec-12-2022, 12:48 PM
    Thread: pyCharm question
Post: RE: pyCharm question

Try CTRL-SHIFT-F10. If that works, then the next time you run, you can use SHIFT-F10 or click the run button. You can also see these options if you right click on the file's tab.
popejose General Coding Help 1 996 Apr-17-2022, 08:16 PM
    Thread: Ignore WakeWord after it's said
Post: RE: Ignore WakeWord after it's said

On line 82 it looks like you've got the command string. Check to see if that starts with the wake word and slice it out.
popejose General Coding Help 2 1,137 Apr-01-2022, 12:26 AM
    Thread: cv2-python will n ot compile??
Post: RE: cv2-python will n ot compile??

Yes I was able to get pyinstaller's 50mb exe to run. I tried running it from different paths outside my venv and it still worked. I did this from a clean venv. You might want to try that to see if...
popejose General Coding Help 5 2,127 Dec-26-2021, 05:20 PM
    Thread: cv2-python will n ot compile??
Post: RE: cv2-python will n ot compile??

ap = cv2.VideoCapture(1)First thing is the variable name should be cap Also, if you only have one webcam installed on that machine then the device number would be 0. This worked on my laptop with on...
popejose General Coding Help 5 2,127 Dec-26-2021, 04:28 PM
    Thread: Homework Help
Post: RE: Homework Help

Do we want the answer as a fraction?
popejose Homework 4 2,053 Oct-11-2021, 11:19 AM
    Thread: I need Help with my code
Post: RE: I need Help with my code

If the files are all in the same directory you could use os.listdir to read filenames. import os dir_contents = os.listdir('c:/dev/test') for item in dir_contents: if item.endswith('.xls'): ...
popejose General Coding Help 2 1,299 Sep-06-2021, 12:05 PM
    Thread: If condition not met but still running
Post: RE: If condition not met but still running

if convert == "K" or convert == "k": print("Rough weight in Kg: " + str(float(weight) // 2.205)) elif convert == "L" or convert == "l": print("Rough weight in Lbs: " + str(float(weight) * 2.20...
popejose General Coding Help 4 1,903 Aug-28-2021, 05:24 AM
    Thread: Serial connection connection issue
Post: RE: Serial connection connection issue

Can you confirm you have installed the pyserial module? If not, pip install pyserial should do it.
popejose General Coding Help 15 7,837 Aug-26-2021, 03:04 PM
    Thread: Accessing varying command line arguements
Post: RE: Accessing varying command line arguements

Im just a hobbyist at this but my fix would be to use a default value for TestType parameter and test for it. def __init__(self, URL, Config, Version, TestType=None): if TestType == None: ...
popejose General Coding Help 3 2,009 Jul-28-2021, 12:49 PM
    Thread: Unable to unpack at line 184
Post: RE: Unable to unpack at line 184

Somewhere in your code there must be line that looks something like spell, dmg = choose_enemy_spell()Python is telling us that it is "unable to unpack". Consider what spell and dmg variables would b...
popejose Homework 4 2,830 Apr-28-2021, 02:59 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020