question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

boxsdk 1.x does not import in python 3.6.0

See original GitHub issue

Running a simple script in Python 3.6.0 fails to import the boxsdk module:

Traceback (most recent call last):
  File "sources/box.py", line 1, in <module>
    from boxsdk import OAuth2, Client
  File "/usr/local/lib/python3.6/site-packages/boxsdk/__init__.py", line 6, in <module>
    from .client import *  # pylint:disable=wildcard-import,redefined-builtin
  File "/usr/local/lib/python3.6/site-packages/boxsdk/client/__init__.py", line 5, in <module>
    from .client import Client
  File "/usr/local/lib/python3.6/site-packages/boxsdk/client/client.py", line 12, in <module>
    from ..object.events import Events
  File "/usr/local/lib/python3.6/site-packages/boxsdk/object/events.py", line 15, in <module>
    class EventsStreamType(with_metaclass(ExtendableEnumMeta, TextEnum)):
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/enum.py", line 119, in __prepare__
    member_type, first_enum = metacls._get_mixins_(bases)
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/enum.py", line 439, in _get_mixins_
    raise TypeError("new enumerations must be created as "
TypeError: new enumerations must be created as `ClassName([mixin_type,] enum_type)`

This is on OS X Sierra, with the latest stable version (1.5.3). The script works fine in Python 3.5.2. Tox tests also fail on the 1.5.3 tag, but run cleanly on HEAD.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
incidentistcommented, Feb 24, 2017

I think that would be wise, since this is an instant hard crash with the latest stable version. For now, specifying boxsdk==2.0.0a4 in my pip requirements.txt does what I need it to do.

1reaction
prahladyericommented, Jul 6, 2017

The boxsdk==2.0.0a4 workaround suggested by @incidentist works great, but this needs to be solved at priority.

Read more comments on GitHub >

github_iconTop Results From Across the Web

boxsdk demo/auth.py fails on from boxsdk import OAuth2
Tried to run authenticate() within boxsdk: demo/auth.py and get ... boxsdk 1.x does not import in python 3.6.0 · Issue #195 · box/box...
Read more >
Python 3 boxsdk - Box Support
File "boxInit.py", line 1, in from boxsdk import OAuth2, Client ModuleNotFoundError: No module named 'boxsdk'.
Read more >
What's New In Python 3.6 — Python 3.11.1 documentation
Import now raises the new exception ModuleNotFoundError (subclass of ImportError ) when it cannot find a module. Code that currently checks for ImportError...
Read more >
Box SDK for Python - Morioh
Box SDK for Python, The current version of the SDK is v3.x --- With this release ... Or, if that doesn't work, file...
Read more >
List of Packages - Anvil Docs
Due to running costs, Free Plan users can't enable the Full Python interpreter. You can still use any Python package you like on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found