Athenahealth Sandbox - No module named 'athenahealthapi' - python-3.x

I'm trying to play with sandbox on athenahealth - https://docs.athenahealth.com/api/guides/explore-and-prototype - After registering and creating an application, I begin using sandbox - try sandbox. I scroll to the sample code, go to GH >> samplecode >> python3 >> testing.py. When pulling this and running this code I continuously get error
ModuleNotFoundError: No module named 'athenahealthapi'
I am unable to install athenahealthapi

If you are looking at the API code samples you should see one that has a class connection called APIConnection. I believe you need to save that code as a file named athenahealthapi.py in the same folder that you are running your script. That essentially is the athenahealthapi module and it pulls the APIConnection class as athenahealthapi.APIConnection(). I got past that part but am now having trouble with a missing access_token key error. :(

Related

AWS Lambda returns Unable to import module 'main': No module named 'main' when modules are there

So I'm trying to set up a function in AWS Lambda to run some python code I imported from a zip.
I've edited the handler to run the file then the function I want to run
I've tried having the file in the directory created when I imported the zip folder, after which I I moved it to the main function directory. Neither worked
Not too sure what is wrong here,
the full error returned when I run test is:
Response
{
"errorMessage": "Unable to import module 'main': No module named 'main'",
"errorType": "Runtime.ImportModuleError",
"stackTrace": []
}
Edit: really new to Lambda so please excuse any silly mistakes
The problem is that, while you appear to have a module named main, it has not been deployed to the Lambda service yet. When you click Test, Lambda runs the deployed code. Perhaps your module was renamed to main some time after your initial deployment?
Local changes to code need to be saved and then deployed. The deploy step is important because until you deploy the code, the Lambda service will continue to run the previous code.
This has actually been a common problem historically in the Lambda console, but enhancements have been made to make it more obvious that a deployment is needed. For example the console now indicates "Changes not deployed" after you make a change, until you hit the Deploy button.
I found this question while facing the problem myself. Issue was that the zip put "main.py" in a subfolder.
Hope this is helpful for any others!

tensorflow_hub not working on google app engine

The following python code is throwing an error on Google App Engine:
import tensorflow_hub as hub
embed = hub.Module("https://tfhub.dev/google/universal-sentence-encoder/4")
Error:
RuntimeError: Missing implementation that supports: loader(*('/tmp/tfhub_modules/063d866c06683311b44b4992fd46003be952409c',), **{})
My app.yaml is Standard environment and is using
instance_class: F4_1G
This works on my local box
Seems like similar issue to the one posted here. Would you be able to confirm if this mitigation helped in your case?
The error message 'RuntimeError: Missing implementation ...' comes up when using a directory that exists but does not contain a tfhub_module.pb file with a known module format. In particular, you can get this message by trying to load a hub.Module from a directory that contains something else.

Docusign: Sample Code Cannot Connect to '/app-shell'?

I'm using the sample code provided by DocuSign in the Github project "qs-01-node-embed-signing-ceremony-master".
I've obtained and added my accessToken and accountId.
When the sample code is run via npm start, it displays an error message in the browser window:
Cannot GET /app-shell
Chrome dev tools shows this:
The sample code appears to contain no file named app-shell.
How can I correct this?
I looked at this sample code and tried it from scratch. I cannot find a file named workbox-core.dev.js in there and when I tried it - it worked just fine.
Please check if this is not something in your environment that may be causing this.
Try a new fresh clone from scratch just in case.
It looks like there are unaddressed caching anomalies with the demo code. Selecting "Empty Cache and Hard Reload" in Chrome fixed it.
After successfully signing the test doc, I still got the "Cannot GET /app-shell" message, but that glitch seems to be specific to the demo code.
Hopefully this is enough of a test for me to start implementing Docusign in my app.
Note: It appears that this demo was not built with create-react-app or other tech that auto-rebuilds and reloads the page when the source is edited.

Google Cloud Natural Language Example

I have followed the getting started page closely.
https://cloud.google.com/natural-language/docs/reference/libraries#client-libraries-install-php
The example code has the following: $projectId = 'YOUR_PROJECT_ID';
I fill in my project id taken from the json file and the Google console--e.g. "$projectID = 'myproject-197218'" and I always get a fatal error with "Permission Denied."
I have set the env variable, run composer to install the library. And, I created the Google json file. I am running the example in PHP code.
I am running the code on my local server (xampp).
I figured out my problem. The Google Cloud json file was stored on my drive d:, so in the env variable I referenced it as 'GOOGLE_APPLICATION_CREDENTIALS= d:\xampp\htdocs\googapi\mproj.json', it did not work; when I moved it to the root of the c: drive and referenced it there (GOOGLE_APPLICATION_CREDENTIALS=c:proj.json), it worked fine.
Are you sure that the ID of your project is that one? I'm working in Google Cloud and I cannot see this project ID in our database, but if I type "my-project-197218" with a "-" between "my" and "project" I am able to find one project. please, to make sure that this is your correct project ID, run this command in your Google Cloud Shell to get the default project ID:
gcloud config list --format 'value(core.project)' 2>/dev/null

Getting EXC_BAD_ACCESS(code=EXC_i386_GPFLT) when migrating existing tests to XCTest

I have been using GHUnit with it without any problem to test a library.
This library basically perform calls to an API and use CoreData to decrease the number of API calls.
Then, I decided to switch to XCTest:
Created the test Target
Created the test class
Tests runs fine! wheeee!!!
However anything I try to do that involves CoreData I get a error: EXC_BAD_ACCESS(code=EXC_i386_GPFLT)
It does not happens with GHUnit, it is the same code!
Also, it runs if I set the "Host Application".
I know that the error is related to trying to access an address that the code is not suppose to, but there's no more details.
I see that in the DatabaseManager the line:
NSString *modelPath = [bundle pathForResource:bundlePath ofType:#"momd"];
Returns nil, but, as I said it runs fine when using GHUnit
or simply using the library.
I feel like I am missing some property in the project settings.
I have added the log here:
https://gist.githubusercontent.com/wilsolutions/96e3ae1310ccae86d344/raw/03ea1dfcdab75fc215baaba9d07123bd2e915617/gistfile1.txt
tkx

Resources