Tag Archives: robotics

Duinotech Hall Effect Sensor with RaspberryPi

Hi everyone,

This is just a quick post to cover how the Duinotech hall effect sensor module (XC-4434) can be hooked up to a RaspberryPi.

Sample Code

The code below will output a zero when the sensor is activated by a magnet, otherwise a zero.


import time
import datetime
import RPi.GPIO as GPIO

# Define constants
BUCKET_HALL_EFFECT_SIG_PIN = 14

# Setup GPIO pins
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(BUCKET_HALL_EFFECT_SIG_PIN, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Important

while True:
print(str(GPIO.input(BUCKET_HALL_EFFECT_SIG_PIN))
time.sleep(0.5)

Wiring

Example

When near a magnetic field the light on the sensor will turn on. If you’re using the sample code above, a zero will be shown when close to a magnet, otherwise a 1.

Misc

Purchased from: https://www.jaycar.com.au/arduino-compatible-hall-effect-sensor-module/p/XC4434

Spec Sheet: Z7275

Could not find a version that satisfied the requirement smbus/python3-smbus

Hi everyone,

I ran into a bit of an issue installing smbus on Python3.5. It looks like all you have to do is use smbus2:

pip3.5 install smbus2

Collecting smbus2
Downloading smbus2-0.2.0.tar.gz
Building wheels for collected packages: smbus2
Running setup.py bdist_wheel for smbus2 … done
Stored in directory: /root/.cache/pip/wheels/90/71/b4/9f90d8e2d0349ab55fef07169a81bd8f925965f16174e2f809
Successfully built smbus2
Installing collected packages: smbus2
Successfully installed smbus2-0.2.0

Thanks to the following link: https://www.raspberrypi.org/forums/viewtopic.php?t=192909

Pillow Install Fails – Python 3.5.2

Hi everyone,

Pillow install fails

I ran into a bit of an issue trying to install Pillow on Raspbian with Python 3.5.2. The full error is below, but the solution was simply to install the following:

sudo apt-get install libjpeg8-dev
sudo pip3.5 install pillow

sudo pip3.5 install pillow
Collecting pillow
Using cached Pillow-4.3.0.tar.gz
Requirement already satisfied: olefile in /usr/local/lib/python3.5/site-packages (from pillow)
Installing collected packages: pillow
Running setup.py install for pillow … error
Complete output from command /usr/local/bin/python3.5 -u -c “import setuptools, tokenize;__file__=’/tmp/pip-build-inj0l_9q/pillow/setup.py’;f=getattr(tokenize, ‘open’, open)(__file__);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, __file__, ‘exec’))” install –record /tmp/pip-xp_x4w_5-record/install-record.txt –single-version-externally-managed –compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.5
creating build/lib.linux-armv7l-3.5/PIL
copying PIL/MicImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageMath.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImagePath.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageGrab.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/SunImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/__init__.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageEnhance.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageMorph.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FtexImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageDraw2.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/IptcImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/_binary.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/Image.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/MspImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageWin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageTk.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PSDraw.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/McIdasImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageStat.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageChops.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PdfImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/features.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PcfFontFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageOps.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImagePalette.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageSequence.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/_util.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/TiffTags.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/DdsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ExifTags.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PyAccess.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageCms.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PaletteFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageFilter.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageFont.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GifImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/XbmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PngImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FontFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/_tkinter_finder.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/OleFileIO.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/BdfFontFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GimpGradientFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/WalImageFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/version.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageQt.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageDraw.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GdImageFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ContainerIO.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/CurImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FliImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageMode.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/JpegPresets.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageColor.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageTransform.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageShow.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/TarIO.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
running egg_info
writing dependency_links to Pillow.egg-info/dependency_links.txt
writing requirements to Pillow.egg-info/requires.txt
writing top-level names to Pillow.egg-info/top_level.txt
writing Pillow.egg-info/PKG-INFO
warning: manifest_maker: standard file ‘-c’ not found

reading manifest file ‘Pillow.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching ‘*.sh’
no previously-included directories found matching ‘docs/_static’
warning: no previously-included files found matching ‘.coveragerc’
warning: no previously-included files found matching ‘codecov.yml’
warning: no previously-included files found matching ‘.editorconfig’
warning: no previously-included files found matching ‘.landscape.yaml’
warning: no previously-included files found matching ‘.travis’
warning: no previously-included files found matching ‘.travis/*’
warning: no previously-included files found matching ‘appveyor.yml’
warning: no previously-included files found matching ‘build_children.sh’
warning: no previously-included files found matching ‘tox.ini’
warning: no previously-included files matching ‘.git*’ found anywhere in distribution
warning: no previously-included files matching ‘*.pyc’ found anywhere in distribution
warning: no previously-included files matching ‘*.so’ found anywhere in distribution
writing manifest file ‘Pillow.egg-info/SOURCES.txt’
running build_ext

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html

Traceback (most recent call last):
File “/tmp/pip-build-inj0l_9q/pillow/setup.py”, line 787, in
zip_safe=not (debug_build() or PLATFORM_MINGW), )
File “/usr/local/lib/python3.5/distutils/core.py”, line 148, in setup
dist.run_commands()
File “/usr/local/lib/python3.5/distutils/dist.py”, line 955, in run_commands
self.run_command(cmd)
File “/usr/local/lib/python3.5/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/local/lib/python3.5/site-packages/setuptools/command/install.py”, line 61, in run
return orig.install.run(self)
File “/usr/local/lib/python3.5/distutils/command/install.py”, line 539, in run
self.run_command(‘build’)
File “/usr/local/lib/python3.5/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/local/lib/python3.5/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/local/lib/python3.5/distutils/command/build.py”, line 135, in run
self.run_command(cmd_name)
File “/usr/local/lib/python3.5/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/local/lib/python3.5/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/local/lib/python3.5/distutils/command/build_ext.py”, line 338, in run
self.build_extensions()
File “/tmp/pip-build-inj0l_9q/pillow/setup.py”, line 577, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: jpeg

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ““, line 1, in
File “/tmp/pip-build-inj0l_9q/pillow/setup.py”, line 799, in
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html

—————————————-
Command “/usr/local/bin/python3.5 -u -c “import setuptools, tokenize;__file__=’/tmp/pip-build-inj0l_9q/pillow/setup.py’;f=getattr(tokenize, ‘open’, open)(__file__);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, __file__, ‘exec’))” install –record /tmp/pip-xp_x4w_5-record/install-record.txt –single-version-externally-managed –compile” failed with error code 1 in /tmp/pip-build-inj0l_9q/pillow/

Thanks to the comment on the following Stackoverflow post for the solution: https://stackoverflow.com/a/34631976/522859

Updating to Python 3.5.1 on RaspberryPi

Hi everyone,

Just a quick post on how to update to Python 3.5.1 the normal upgrade process isn’t working for you:


cd ~
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
tar -zxvf Python-3.5.1.tgz
cd Python-3.5.1
./configure && make && sudo make install

You may need to restart once this is complete. Run the following to confirm that the version is 3.5.1:

pi@raspberrypi:~ $ python3 --version
Python 3.5.1

Check out the following link for more info: https://stackoverflow.com/a/37079319/522859

AttributeError: ‘dict’ object has no attribute ‘iteritems’ – Python

Hey everyone,

Just running through object detection samples for Tensorflow and I encountered the following error:

Sample: https://github.com/GoogleCloudPlatform/tensorflow-object-detection-example

AttributeError: ‘dict’ object has no attribute ‘iteritems’

The issue seems to be that the sample hasn’t been made compatible with Python 3.x. Simply make the following change and it should work:


# Original
for cls, new_image in new_images.iteritems():

# Changed
for cls, new_image in new_images.items():

Thanks to the following StackOverflow post: https://stackoverflow.com/a/30418498/522859

Converting proto files to .py on Windows – Tensorflow

Hey everyone,

Ran into a bit of an issue today with Tensorflow:

ImportError: cannot import name preprocessor_pb2

Turned out that I hadn’t run some of the installing steps. I needed to use protoc to convert the proto directory files:

protoc object_detection/protos/preprocessor_pb2.proto --python_out=.

This turned out to be a bit of a headache as well, but thankfully a github post explained it all pretty well:

Here are the steps I followed to install it for windows:
(Prerequisite, you must have python, pip and)

Choose a Python release from here and download: Link here
– Extract the tar.gzor zip
– Open a cmd and pip install the following: pillow, lxml, jupyter, matplotlib
– Copy the protoc.exe from the protoc folder (you don’t need to do all the CMake steps you might have stumbled upon, it worked for me without them too) and paste it into your protos folder in the object detection directory.
– Run the protoc for each of those protos like “protoc object_detection/protos/*.proto –python_out=.”. . Note that you might encounter a problem with the paths and there’s two ways around that: Either move the protoc.exe two folders down or do the noobish thing that I did – copy the protos and paste them into a new directory inside the protos folder ‘object_detection\protos’ so you would have a folder structure like’\object_detection\protos\object_detection\protos’ (If it looks stupid but it works, it’s not stupid eh?) Note that *.proto might also not work and you might have to do each of them individually
– You are done. :) Try to run something to see if you have any problems. You might have to install a manual version of numpyandscipy

GitHub Link: https://github.com/tensorflow/models/issues/1934

Compass Only Works on Pins 10 and 11 – Arduino/Software Serial

Hey everyone,

A bit of a confusing issue I ran into today. I couldn’t get my compass to work on any pins other than 10 or 11. Thankfully, there’s a fairly logical explanation:

Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).

I ended up using pins 50 and 51 and it all worked fine. See the following links for more info:
https://www.arduino.cc/en/Reference/softwareSerial
https://arduino.stackexchange.com/a/35719/37451

Arduino GPS – Ublox NEO-M8N Flight Controller GPS w/Protective Shell for PIX PX4 Pixhawk

Hey everyone,

I recently purchased this GPS unit on ebay: http://cgi.ebay.com.au/ws/eBayISAPI.dll?ViewItemVersion&item=272492032614&view=all&tid=1865626885017

Unfortunately, I didn’t do a lot of research before getting it and had a bit of trouble finding any spec sheets or documentation. Just in case anyone else has the same problem I’ve listed out everything I needed to get it running below.

This is the wiring info you’ll need:
– VCC: red
– GND: black
– TXD: yellow
– RXD: white
– SCL: green
– SDA: blue

The default baud rate was 38400.

This is the example I ended up using to get a quick test up and running. Ensure that you map the rx and tx pins correctly (arduino tx to gps rx, arduino rx to gps tx).


v#include
#include
/*
This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 11, TXPin = 10;
static const uint32_t GPSBaud = 38400;

// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup()
{
Serial.begin(115200);
ss.begin(GPSBaud);

Serial.println(F("DeviceExample.ino"));
Serial.println(F("A simple demonstration of TinyGPS++ with an attached GPS module"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();
}

void loop()
{
// This sketch displays information every time a new sentence is correctly encoded.
while (ss.available() > 0)
if (gps.encode(ss.read()))
displayInfo();

if (millis() > 5000 && gps.charsProcessed() < 10) { Serial.println(F("No GPS detected: check wiring.")); while(true); } } void displayInfo() { Serial.print(F("Location: ")); if (gps.location.isValid()) { Serial.print(gps.location.lat(), 6); Serial.print(F(",")); Serial.print(gps.location.lng(), 6); } else { Serial.print(F("INVALID")); } Serial.print(F(" Date/Time: ")); if (gps.date.isValid()) { Serial.print(gps.date.month()); Serial.print(F("/")); Serial.print(gps.date.day()); Serial.print(F("/")); Serial.print(gps.date.year()); } else { Serial.print(F("INVALID")); } Serial.print(F(" ")); if (gps.time.isValid()) { if (gps.time.hour() < 10) Serial.print(F("0")); Serial.print(gps.time.hour()); Serial.print(F(":")); if (gps.time.minute() < 10) Serial.print(F("0")); Serial.print(gps.time.minute()); Serial.print(F(":")); if (gps.time.second() < 10) Serial.print(F("0")); Serial.print(gps.time.second()); Serial.print(F(".")); if (gps.time.centisecond() < 10) Serial.print(F("0")); Serial.print(gps.time.centisecond()); } else { Serial.print(F("INVALID")); } Serial.println(); }

Output should be something like this:

DeviceExample.ino
A simple demonstration of TinyGPS++ with an attached GPS module
Testing TinyGPS++ library v. 0.92
by Mikal Hart

Location: -27.427371,153.028945 Date/Time: 9/10/2017 06:04:21.40
Location: -27.427371,153.028945 Date/Time: 9/10/2017 06:04:21.40
LocatiaonfTGS+wh atahdSmlesiTiGS+bay .2b a at
ain Da/ie/ ai .Da/Te 1tion: -27.427371,153.028945 Date/Time: 9/10/2017 06:04:21.60
Location: -27.427371,153.028945 Date/Time: 9/10/2017 06:04:21.60
LocaS+bay .2b a at
ain Da/ie/ ai .Da/Te 1tion: -.aeTm1.
ti:.atTm:7cation: -27.427370,153.028945 Date/Time: 9/10/2017 06:04:21.80
Location: -27.427370,153.028945 Date/Time: 9/10/2017 06:04:21.80
Location: -27.427370,153.028945 Date/Time: 9/10/2017 06:04:22.00
Location: -27.427370,153.028945 Date/Time: 9/10/2017 06:04:22.00
Location: -27.427370,153.028945 Date/Time: 9/10/2017 06:04:22.20
Location: -27.427370,153.028945 Date/Time: 9/10/2017 06:04:22.20
Location: -27.427370,153.028945 Date/Time: 9/10/2017 06:04:22.40
Locat/Te:/ an:3aTi: /1ain.atTm:7atn 3Dtie 1.cto.3teim 1.
ti: .aTim1aton: -27.427370,153.028945 Date/Time: 9/10/2017 06:04:22.40
Location: -27.427368,153.028945 Date/Time: 9/10/2017 06:04:22.60
Location: -27.427368,153.028945 Datn 3Dtie 1.cto.3teim 1.

One final thing to note is that the blue light will start to flash once the GPS has a lock. You'll need a pretty open space, mine didn't work inside but got a lock within 60 seconds outside.

Let me know if you have any questions or links to better doco!

TensorFlow – KeyError: “The name ‘import/input’ refers to an Operation not in the graph.

Hey everyone,

Just another small error I’ve run into while testing out Tensorflow’s label image example (Tensorflow/tensorflow/examples/image_retraining/label_image.py):

KeyError: "The name 'import/input' refers to an Operation not in the graph.

This one thankfully doesn’t seem to be my fault. In label_image.py change the following lines:

# Line 78-79
input_layer = "input"
output_layer = "InceptionV3/Predictions/Reshape_1"
 
# Change to this
input_layer = "Mul"
output_layer = "final_result"

Once that’s done just rerun your script and it should all work. Thanks to the following post for the solution: https://github.com/tensorflow/tensorflow/issues/12736

Tensorflow – No such file or directory

Hey guys,

Just a quick post on how to resolve an error I came across while testing out tensorflow:

Traceback (most recent call last):
  File "C:\Users\Chris-PC\Desktop\images-to-use\attempt2\tensorflow\examples\label_image\label_image.py", line 112, in <module>
    graph = load_graph(model_file)
  File "C:\Users\Chris-PC\Desktop\images-to-use\attempt2\tensorflow\examples\label_image\label_image.py", line 30, in load_graph
    with open(model_file, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'tensorflow/examples/label_image/data/inception_v3_2016_08_28_frozen.pb'

All you need to do is download the following file and place it in the directory in the error message: https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz