# ReferenceError: \_\_pythonRuntime is not defined

**URL:** <https://discourse.codecombat.com/t/referenceerror-pythonruntime-is-not-defined/24523>\
**Category:** Bugs\
**Created:** [September 29, 2020, 7:27pm UTC](https://discourse.codecombat.com/t/referenceerror-pythonruntime-is-not-defined/24523 "2020-09-29T19:27:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Lydia\_Song](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/lydia_song/32/31461_2.png) [@Lydia\_Song](https://discourse.codecombat.com/u/Lydia_Song)\
**Post date:** [September 29, 2020, 10:21pm UTC](https://discourse.codecombat.com/t/referenceerror-pythonruntime-is-not-defined/24523/3 "2020-09-29T22:21:57Z")

</div>

Welcome welcome @Issi to the forum! It is a lovely place where you can share all kinds of stuff (appropriate of course), share bugs, and even get assistance for code! We suggest that you review [this topic](https://discourse.codecombat.com/t/welcome-to-codecombat-discourse-forums/15601) which shows all essentials of this board! And we suggest you review [this topic](https://discourse.codecombat.com/t/essentials-how-to-post-format-your-code-correctly/15521) which shows how to post your code correctly! Thanks!! 🥳 🥳

Try writing `friend = hero.findNearestFriend()` and `enemy = hero.findNearestEnemy()` at the top of the while true loop? Or maybe try restarting the level and writing the code again.

Lydia

---

_[View the full topic](https://discourse.codecombat.com/t/referenceerror-pythonruntime-is-not-defined/24523)._
