Fix "AttributeError: 'module' object has no attribute 'packages'" // Resolve #252

This commit is contained in:
Ivan Kravets
2015-08-21 23:09:56 +03:00
parent 5422054ae4
commit 20a0592b37
4 changed files with 23 additions and 2 deletions

View File

@ -16,6 +16,13 @@ Release History
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
platform
(`pull #256 <https://github.com/platformio/platformio/pull/256>`_)
* Updated ``tool-teensy`` for `Teensy <http://docs.platformio.org/en/latest/platforms/teensy.html>`__
platform
(`issue #268 <https://github.com/platformio/platformio/issues/268>`_)
* Fixed includes list for Windows OS when generating project for `Eclipse IDE <http://docs.platformio.org/en/latest/ide/eclipse.html>`__
(`issue #270 <https://github.com/platformio/platformio/issues/270>`_)
* Fixed ``AttributeError: 'module' object has no attribute 'packages'``
(`issue #252 <https://github.com/platformio/platformio/issues/252>`_)
2.2.2 (2015-07-30)
------------------

View File

@ -101,6 +101,11 @@ Please upgrade *SetupTools* package:
$ [sudo] pip uninstall platformio
$ [sudo] pip install platformio
Windows: ``AttributeError: 'module' object has no attribute 'packages'``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Answered in `issue #252 <https://github.com/platformio/platformio/issues/252#issuecomment-127072039>`_.
ARM toolchain: ``cc1plus: error while loading shared libraries``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,7 +1,7 @@
# Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
VERSION = (2, 3, "0.dev2")
VERSION = (2, 3, "0a1")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -70,7 +70,16 @@ def main():
try:
# https://urllib3.readthedocs.org
# /en/latest/security.html#insecureplatformwarning
requests.packages.urllib3.disable_warnings()
try:
requests.packages.urllib3.disable_warnings()
except AttributeError:
click.secho(
"Invalid installation of Python `requests` package`. See "
"< https://github.com/platformio/platformio/issues/252 >",
fg="red", err=True
)
return 1
cli(None, None)
except Exception as e: # pylint: disable=W0703