# Unresolved reference 'micropython' in PyCharm

**URL:** <https://forums.digi.com/t/unresolved-reference-micropython-in-pycharm/23248>\
**Category:** XBee Micropython & IDE plugin\
**Tags:** micropython, pycharm, xbee\
**Created:** [October 3, 2022, 8:41am UTC](https://forums.digi.com/t/unresolved-reference-micropython-in-pycharm/23248 "2022-10-03T08:41:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![esimioni](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/esimioni/32/10140_2.png) [@esimioni](https://forums.digi.com/u/esimioni)\
**Post date:** [October 3, 2022, 8:41am UTC](https://forums.digi.com/t/unresolved-reference-micropython-in-pycharm/23248/1 "2022-10-03T08:41:41Z")

</div>

The following import is yielding 2 errors in the file editor:

from micropython import const

- Unresolved reference ‘micropython’
- Unresolved reference ‘const’

The “micropython” one I can set PyCharm to ignore, but the “const” one doesn’t have the same option.

I can build the project and run it on the XBee, but it is quite inconvenient specially because on every build there is an additional popup that I have to interact with:

# Inspection found the following errors:

# - Unresolved reference ‘const’ (main.py)

# Do you want to continue?

-\> I have to click on “Continue Anyway”

PyCharm 2022.2.1  
Digi XBee Plugin 2.1.4 (latest available as of today)

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [October 3, 2022, 8:54am UTC](https://forums.digi.com/t/unresolved-reference-micropython-in-pycharm/23248/2 "2022-10-03T08:54:51Z")

</div>

I would suggest [https://docs.micropython.org/en/latest/library/micropython.html](https://docs.micropython.org/en/latest/library/micropython.html)

---

<div class="post-metadata">

**Author:** ![esimioni](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/esimioni/32/10140_2.png) [@esimioni](https://forums.digi.com/u/esimioni)\
**Post date:** [October 4, 2022, 1:18pm UTC](https://forums.digi.com/t/unresolved-reference-micropython-in-pycharm/23248/3 "2022-10-04T13:18:18Z")

</div>

What “worked” in the end was to remove the import: “from micropython import const”, then on each class that uses ‘const’, tell PyCharm to ignore the unresolved reference ‘const’.
