Thanks for the reply. I'm not sure how to provide a minimal example since the problem is not related to my code or data. The problem can be produced by creating a new markdown document, inserting any non-R code block (e.g., using the "Insert" button at the top of the document and selecting 'python'), then trying to execute any code within this block. I could provide the .Rmd file in the attached image if that would help, even though there's really nothing to it.
In the image I attached in my original post, you'll see that there are no control buttons (for instance, the green play button) at the top right of the python, bash and rcpp blocks, whereas the R block does have these controls. If I try to execute any non-R code within a non-R block (so for e.g., running python code within a python block) using the "Run Current Chunk" button or shortcut, the code is just run as though it is R. So for instance, in the image attached here, you'll see that running the blocks on lines 32 and 36 produces an error for the python code but not for the R code, even though both blocks are labeled as python.
Hope this is clearer.