Could someone help with PyRow TypeError issue?

Post questions and issues with Concept2 PM3 SDK

Could someone help with PyRow TypeError issue?

Postby 11seat » May 22nd, 2016, 12:13 pm

I'm trying to set up PyRow but running into a problem.

When I try to run:
Code: Select all
erg = pyrow.pyrow(ergs[0])

I get this:
Code: Select all
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'generator' object has no attribute '__getitem__'

Has anyone else run into this and resolved it? Detailed steps below.

I am following the steps from the PyRow Github page.

I made a folder on my desktop called "pyrow"
I am running Linux Mint
I copied all the flies down from the PyRow page as a zip file and extracted them into my PyRow folder

At the command prompt, I typed in python to determine that I am running Python 2.7.6

Then I did the following
Code: Select all
$ sudo apt-get update
$ sudo apt-get install libudev-dev libusb-dev python

Then I went to and copied down those files as zip then extracted them to pyusb-master folder in pyrow folder.
Navigated to the pyusb-master folder.

Code: Select all
sudo python install

Everything seemed to be installing OK. I went back up to pyrow folder and ran the following:
Code: Select all
>>> import pyrow
>>> pyrow.find()
<generator object device_iter at 0x(some_hex_code_here)>
>>> ergs = pyrow.find()
>>> erg = pyrow.pyrow(ergs[0])
File "<stdin>", line 1, in <module>
TypeError: 'generator' object has no attribute '__getitem__'

I think everything is installed correctly since I didn't get errors during install and the first commands seem to be running. But I don't know what to do about the TypeError. Searching for that error doesn't turn up anything PyRow specific. I tried a search in the file but couldn't find either "generator" or "__getitem__" in there.
Posts: 1
Joined: May 22nd, 2016, 11:52 am

Re: Could someone help with PyRow TypeError issue?

Postby domdv » July 16th, 2016, 4:28 pm

you should run one of the example files included in the pyrow download instead since I get the same error doing exactly as you have in the terminal and my setup on a raspberry pi using debian wheezy os is running fine. or - an example program that records time, distance, strokes per min, pace, and force plot data for each stroke to a csv file - an example program that displays the current machine, workout, and stroke status

I hope this helps you out

Posts: 3
Joined: October 21st, 2013, 4:45 am

Return to SDK Questions

Who is online

Users browsing this forum: No registered users and 1 guest