Skip to content

ImportError: cannot import name 'ExperimentalQuery' from 'O365.utils' #1183

@joao-voltarelli

Description

@joao-voltarelli

Hey,

I saw that in the last release the old 'Query' object was removed and that now by default the 'QueryBuilder' object will be used.

This affected some imports, and I noticed that in the drive.py module, the 'ExperimentalQuery' class (which was an alias for 'QueryBuilder') is still being imported, which caused some problems when I tried to do some imports from the Excel module.

from O365.excel import EXCEL_XLSX_MIME_TYPE, File, WorkBook, WorkSheet

ImportError:

from O365.excel import EXCEL_XLSX_MIME_TYPE, File, WorkBook, WorkSheet
  File "C:\workspace\tests\.venv\Lib\site-packages\O365\excel.py", line 12, in <module>
    from .drive import File
  File "C:\workspace\tests\.venv\Lib\site-packages\O365\drive.py", line 12, in <module>
    from .utils import (
ImportError: cannot import name 'ExperimentalQuery' from 'O365.utils' (C:\workspace\tests\.venv\Lib\site-packages\O365\utils\__init__.py)

Do you think this needs to be adjusted? Or am I missing something?

Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions