Thanks I have already tried this solution but didn't worked for me. But certificate funtion doesn't take file contents, it takes filename as parameter. Please suggest something to pass file as parameter.
nestor
said
over 6 years ago
Answer
pkgutil already reads the content. I guess this could work:
data = os.path.join(os.path.dirname(__file__), '../resources/file.json')
1 person likes this
R
Ronak Raj Doongarwal
said
over 6 years ago
Thanks for the quick reply. I'll try and reply
R
Ronak Raj Doongarwal
said
over 6 years ago
@nestor Thanks for helping. It worked. Deployed my first spider.
nestor
said
over 6 years ago
You're welcome. Happy scraping!
Y
Yeshwanth Bheempad
said
over 1 year ago
this article is not working can u give relavent one please
S
Sergey Geron
said
over 1 year ago
Hi Yeshwanth, this is Sergey Geron, Business Analyst at Zyte.
Thank you for reaching out through our Forum.
We have changed our domain from support.scrapinghub.com to support.zyte.com
Ronak Raj Doongarwal
I have serviceAccountKey.json file in project root directory which I need to refer in this line of code of one of the python script.
but while deployment it fails giving error:
Please help me how to refer to serviceAccountKey.json file in script which need to be deployed in scrapinghub .
NOTE: I also tried using
and
pkgutil already reads the content. I guess this could work:
data = os.path.join(os.path.dirname(__file__), '../resources/file.json')
- Oldest First
- Popular
- Newest First
Sorted by Oldest Firstnestor
Try: https://support.scrapinghub.com/support/solutions/articles/22000200416-deploying-non-code-files
Ronak Raj Doongarwal
nestor
pkgutil already reads the content. I guess this could work:
data = os.path.join(os.path.dirname(__file__), '../resources/file.json')
1 person likes this
Ronak Raj Doongarwal
Ronak Raj Doongarwal
@nestor Thanks for helping. It worked. Deployed my first spider.
nestor
You're welcome. Happy scraping!
Yeshwanth Bheempad
this article is not working can u give relavent one please
Sergey Geron
Hi Yeshwanth, this is Sergey Geron, Business Analyst at Zyte.
Thank you for reaching out through our Forum.
We have changed our domain from support.scrapinghub.com to support.zyte.com
Check out the article here - https://support.zyte.com/support/solutions/articles/22000200416-deploying-non-code-files
-
Unable to select Scrapy project in GitHub
-
ScrapyCloud can't call spider?
-
Unhandled error in Deferred
-
Item API - Filtering
-
newbie to web scraping but need data from zillow
-
ValueError: Invalid control character
-
Cancelling account
-
Best Practices
-
Beautifulsoup with ScrapingHub
-
Delete a project in ScrapingHub
See all 458 topics