Comments (8)
The code was developed for Python 2.7. For Python 3 the following changes should be made:
On build.py:
- Ensure the argument for all the print calls is inside parenthesis, i.e., print('zipping %s as %s' % (os.path.join(dirname, filename))
- Replace SimpleHTTPServer by http.server, at import and in the webuiserver function
- Replace SocketServer by socketserver, at import and in the webuiserver function
- Replace 'iteritems' by 'items' on lines 160 and 200 for the dict() attribute.
On /client/video_cap_ipcam.py:
- Ensure the argument for all the print calls is inside parenthesis, i.e., print("Sending image to Kinesis")
- Replace 'cPickle' by 'pickle' on lines 12 and 59
On /client/video_cap.py:
- Ensure the argument for all the print calls is inside parenthesis, i.e., print("Sending image to Kinesis")
- Replace 'cPickle' by 'pickle' on lines 7, 12 and 53
Also on /lambda/imageprocessor/imageprocessor.py:
- Replace 'cPickle' by 'pickle' on lines 13 and 67
On AWS, function imageprocessor:
- Change Runtime from Python 2.7 to Python 3.6. This will solve compatibility issues for the pickle protocol
from amazon-rekognition-video-analyzer.
Hi there,
I could not reproduce this error. The code for this loop is complete. This statement, however, is completed on a new line. Could this be the cause in your case?
Thanks,
Moataz
from amazon-rekognition-video-analyzer.
Maybe you are using Python 3.
That was my mistake.
from amazon-rekognition-video-analyzer.
@marioalfaro75 Closing this issue. Please post any updates/questions and I'll re-open.
from amazon-rekognition-video-analyzer.
Hi @adrianmelic @moanany
I'm getting the same issue.
C:\face>pynt -l Traceback (most recent call last): File "c:\python36\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Python36\Scripts\pynt.exe\__main__.py", line 9, in <module> File "c:\python36\lib\site-packages\pynt\_pynt.py", line 295, in main build(sys.argv[1:]) File "c:\python36\lib\site-packages\pynt\_pynt.py", line 48, in build module = imp.load_source(path.splitext(path.basename(args.file))[0], args.fi le) File "c:\python36\lib\imp.py", line 172, in load_source module = _load(spec) File "<frozen importlib._bootstrap>", line 684, in _load File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 674, in exec_module File "<frozen importlib._bootstrap_external>", line 781, in get_code File "<frozen importlib._bootstrap_external>", line 741, in source_to_code File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "build.py", line 25 print 'zipping %s as %s' % (os.path.join(dirname, filename), ^ SyntaxError: invalid syntax
@adrianmelic how did you fix it?
Thanks a ton!
from amazon-rekognition-video-analyzer.
@poornimasivakumar I just used Python 3 and not Python 2.7.
from amazon-rekognition-video-analyzer.
hi @adrianmelic I'm using python 3.7 and I still the same issue. Any help would be appreciated. Thanks!
from amazon-rekognition-video-analyzer.
Sorry @sujithaperumal it has been so long that I don't even remember this issue :(
from amazon-rekognition-video-analyzer.
Related Issues (20)
- Error with build.py file HOT 2
- pynt create stack: HOT 4
- 'JobStatus': 'FAILED', 'StatusMessage': 'Unsupported codec/format.' HOT 1
- Video takes infinite time to analyze HOT 2
- Having Trouble Creating Stack
- Final step videocapture HOT 4
- Accessing VideoCaptureIP
- amazon-rekognition-video-analyzer does not return data the request HOT 4
- Hey, I have a question...
- Has anyone set it up?
- Video/Image does not appear on webui
- 我的外包
- All works (after some modification), except viewing image frames
- Update example to use SigV4 S3 URLs
- create stack fails
- import cv2 not working
- No module named http.server HOT 1
- Video doesn't load to the webui
- Using Container in ImageProcessor Lambda Function
- duplicated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-rekognition-video-analyzer.