PlatformIO Community

Wired tmp file and ImportError: No module named logger

hi all

I try to use platformio unit test but it happens an error which I could not find its reason in google.
Anyone could give me some hints to solve it?

The following section is the error message.

Developing Environment:

  • ssh login remote raspberry pi
  • Use pip install platformio
  • Use virtualenv to ensure clean environment

What I have tried

  • Already try “pip install logger” and package existed
  • Reinstall whole platformio package

pip list
bottle (0.12.10)
click (5.1)
colorama (0.3.7)
lockfile (0.12.2)
logger (1.4)
pip (9.0.1)
platformio (3.1.0)
pyserial (3.2.1)
requests (2.11.1)
semantic-version (2.6.0)
setuptools (28.8.0)
wheel (0.30.0a0)

platform.ini
[env:common]
build_flags = -lstdc++
[env:uno]
platform = atmelavr
framework = arduino
board = uno
# Upload_port
# Mac
# - usbmodem1421 is left side of mac usb3.0 port
# - usbmodem1411 is right side of mac usb3.0 port
# upload_port = /dev/cu.usbmodem1421
# Raspberry
# - ttyACM0: Production hardware
# - ttyACM1: Testing hardware
upload_port = /dev/ttyACM2

[env:megaatmega2560]
platform = atmelavr
framework = arduino
board = megaatmega2560

[env:local]
platform = native

It seems that you have own obsolate twisted version in the system. Could you share an ouput of pip list outside virtualenv?

here is my pip list without vitrualenv

bottle (0.12.10)
characteristic (0.1.0)
chardet (2.3.0)
click (5.1)
colorama (0.3.7)
deluge (1.3.10)
lockfile (0.12.2)
logger (1.4)
numpy (1.8.2)
PAM (0.4.2)
pip (9.0.1)
pyasn1 (0.1.7)
pyasn1-modules (0.0.5)
pygame (1.9.2a0)
pygobject (3.14.0)
pyOpenSSL (0.13.1)
pyserial (3.2.1)
python-apt (0.9.3.12)
python-libtorrent (0.16.18)
pyxdg (0.25)
requests (2.11.1)
RPi.GPIO (0.6.2)
semantic-version (2.6.0)
service-identity (1.0.0)
setuptools (27.1.2)
Twisted-Core (14.0.2)
Twisted-Web (14.0.2)
virtualenv (15.0.3)
wheel (0.29.0)
wicd (1.7.2.4)
zope.interface (4.1.1)

Did you install it? If you need to have multiple versions of Twisted engine, you can run PlatformIO inside virtual environment

cd ~
virtualenv pioenv
source pioenv/bin/activate
(pioenv) pip install -U https://github.com/platformio/platformio/archive/develop.zip
(pioenv) pio --version

Next time if you need to work with PIO in env, just repeat source pioenv/bin/activate.

Thank for your reply.
I tried your instructions in my virtualenv then it works.
But it cannot find suitable package for my raspberry Pi 2 model B (linux_armv7l) architecture

The following message:

(env-openirrig) (env-openirrig")[  9:54pm ]  [ ykhorizon@raspberrypi:~/workplace ]
 $ pio test -e uno
PioPlusPackageManager: Installing pysite-pioplus @ >=0.2.0,<2
Error: Could not find a version that satisfies the requirement '>=0.2.0,<2' for your system 'linux_armv7l'

I found this package on sourceforge but only providing linux arm6v
https://sourceforge.net/p/platformio-storage/activity/?page=0&limit=100#581b3dbb34309d59f9a2e383

I don’t know what should I do…:scream:

We have binaries for all 6 platforms/OSs: Windows, macOS, Linux 32/64, FreeBSD and LInux ARM v6/v7.

The tool-pioplus-linux_armv6l-0.5.2.tar.gz package is compatible with ARM v6/v7.

P.S: We don’t use SourceForge for PIO Plus. See https://bintray.com/platformio/dl-packages/tool-pioplus/0.5.2#files

I’ve just checked on my RPi with ARMv7

(venv)pi@raspberrypi ~ $ pio account info
PioPlusPackageManager: Installing tool-pioplus @ >=0.5.0,<2
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
tool-pioplus @ 0.5.2 has been successfully installed!
PlatformIO Plus (https://pioplus.com) v0.5.2
Group PlatformIO Plus Community
-------------------------------
Expire: -
Permissions: OTA Device Manager, Remote Agent List, 1 Concurrent Remote Agent, OTA Serial Port Monitor (10 per month), OTA Firmware Updates (50 per month)

Group PlatformIO Plus Professional
----------------------------------
Expire: -
Permissions: Unlimited OTA Serial Port Monitor, Unlimited OTA Firmware Updates, Remote Unit Testing, Local Unit Testing, 10 Concurrent Remote Agents, 15 Shares for Remote Agent

Group PlatformIO Plus Unit Testing Trial
----------------------------------------
Expire: 2016-11-23 19:26:07
Permissions: Remote Unit Testing, Local Unit Testing

(venv)pi@raspberrypi ~ $ python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from platformio import util
>>> util.get_systype()
'linux_armv7l'
>>>

Try to upgrade to the latest development version of PlatformIO

pio upgrade

Thank your for your help! :grinning:
I will try it soon!
( By the way, sorry for reply so late)

@ykhorzon Please sorry, that was a broken package. Please try again and all should work! :blush: