almouro / bitrise-giphy-step Goto Github PK
View Code? Open in Web Editor NEWSpice up your Bitrise.io logs with a random Gif from Giphy
Home Page: http://bitrise.io
License: MIT License
Spice up your Bitrise.io logs with a random Gif from Giphy
Home Page: http://bitrise.io
License: MIT License
Exception is being thrown when Bitrise step is executed.
Am using my own registered API key that returns results perfectly fine within Postman.
+------------------------------------------------------------------------------+
| (4) [email protected] |
+------------------------------------------------------------------------------+
| id: giphy |
| version: 0.2.0 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: bash |
| time: 2020-11-23T12:51:42+11:00 |
+------------------------------------------------------------------------------+
| |
Traceback (most recent call last):
File "/var/folders/gp/mm15yx614cg04by6xp_bh2240000gn/T/bitrise589296632/step_src/step.py", line 38, in <module>
gif = getGif(gifName, apiKey)
File "/var/folders/gp/mm15yx614cg04by6xp_bh2240000gn/T/bitrise589296632/step_src/step.py", line 30, in getGif
return data[random.randint(0,len(data) - 1)]['images']['fixed_height']['url']
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 244, in randint
return self.randrange(a, b+1)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 220, in randrange
raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart, istop, width)
ValueError: empty range for randrange() (0,0, 0)
I have Giphy step at the end of my workflow and it exits with following error:
+------------------------------------------------------------------------------+
| (2) giphy |
+------------------------------------------------------------------------------+
| id: giphy |
| version: 0.1.1 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: bash |
| time: 2019-05-09T19:54:05Z |
+------------------------------------------------------------------------------+
| |
Traceback (most recent call last):
File "/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise569362648/step_src/step.py", line 36, in <module>
gif = getGif(gifName)
File "/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise569362648/step_src/step.py", line 31, in getGif
data = getJson(baseUrl, queryParams)['data']
File "/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise569362648/step_src/step.py", line 15, in getJson
response = urllib2.urlopen(url)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 429: Unknown Error
WARN[19:54:07] Step (giphy) failed, but was marked as skippable
This is part of my workflow that is related to Giphy:
- script:
inputs:
- content: |-
#!/bin/bash
set -e
set -x
if [ $BITRISE_BUILD_STATUS -eq 1 ]
then envman add --key GIPHY_KEYWORDS --value "fail,disappointed,try again"
else envman add --key GIPHY_KEYWORDS --value "success,congrats,victory"
fi
end=$(date +%s)
let duration=end-BITRISE_BUILD_TRIGGER_TIMESTAMP
echo $duration
- giphy:
inputs:
- gif_words: "$GIPHY_KEYWORDS"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.