# Underscore in attribute name

**URL:** <https://forums.plex.tv/t/underscore-in-attribute-name/9214>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [May 12, 2011, 3:22am UTC](https://forums.plex.tv/t/underscore-in-attribute-name/9214 "2011-05-12T03:22:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikedecaro](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mikedecaro](https://forums.plex.tv/u/mikedecaro)\
**Post date:** [May 12, 2011, 3:22am UTC](https://forums.plex.tv/t/underscore-in-attribute-name/9214/1 "2011-05-12T03:22:15Z")

</div>

I’m new to writing Plex plugins and I’m having an issue with calls to the [oauth2](https://github.com/simplegeo/python-oauth2) library. When I use the library in a standalone application, everything works fine. When I try to use it in my Plex plugin, I get the following error on load. I also see a bunch of security errors before the exception occurs.  
  
  
  
SyntaxError: Line 50: “ **version** ” is an invalid attribute name because it starts with “\_”.  
  
  
  
Why is Plex/Python treating this differently in the plugin than the standalone app?

---

<div class="post-metadata">

**Author:** ![mikedecaro](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mikedecaro](https://forums.plex.tv/u/mikedecaro)\
**Post date:** [May 13, 2011, 2:49am UTC](https://forums.plex.tv/t/underscore-in-attribute-name/9214/2 "2011-05-13T02:49:15Z")

</div>

Figured it out. Found the answer in [this post](http://forums.plexapp.com/index.php/topic/18324-updating-plugins-to-v2-framework/).

> [@](#):
>
> Also, if you need to avoid some of the restrictions the Plex framework imposes, move that portion of your code into a seperate file and put it in Contents/Libraries/Shared in the bundle. This mean it won’t be subject to the restrictions applied by the framework (but it won’t be able to use any framework API features either). You’ll need to set PlexPluginCodePolicy to Elevated in the Info.plist file as well.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 9:07pm UTC](https://forums.plex.tv/t/underscore-in-attribute-name/9214/3 "2019-12-20T21:07:44Z")

</div>

Closed on December 20, 2019, 9:07pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
