A. I am not a pathologist
or entomologist but maybe this is bacterial stem rot which could make a yeasty
smell in any sap coming out. It could possibly be stem borer but I think stem
rot makes more sense to me.
Cut it open and see if you see a “worm” inside the stem.
If you do, it is stem borer.
Smell the liquid coming from the damaged area that
attracts wasps and see if it smells “yeasty”. If it does, then it is probably
Erwinia (bacterial) stem rot. Anyway, this bacterial disease should have a foul
smell if you get your nose right up to it. Plant diseases don’t hurt animals do it won't harm you.
In any case, you can wait and let the seeds mature for eating or planting and get rid of it OR get rid of it now. If this is bacterial stem rot it can spread from plant to plant through open wounds and spread by insects. Pruning of infected plants followed by pruning of uninfected plants can transmit this disease from plant to plant. Dont water these plants with splashing water from a hose or hose end sprayer. Sanitation is very important.
In any case, you can wait and let the seeds mature for eating or planting and get rid of it OR get rid of it now. If this is bacterial stem rot it can spread from plant to plant through open wounds and spread by insects. Pruning of infected plants followed by pruning of uninfected plants can transmit this disease from plant to plant. Dont water these plants with splashing water from a hose or hose end sprayer. Sanitation is very important.