Git Product home page Git Product logo

Comments (12)

KiwiFPVHarry avatar KiwiFPVHarry commented on May 8, 2024

Python is version 3.8.6, Bazel is verison 3.7.0, Java 11.0.9, Ubuntu 20.10 64 bit.

from fhir-examples.

Cam2337 avatar Cam2337 commented on May 8, 2024

Hi @KiwiFPVHarry!

Could you confirm whether there's a pip binary installed for your Python interpreter?

python3 --version
python3 -m pip

The Bazel workspace installs pip requirements during setup, and in doing so will require pip to be discoverable on your PATH. Even if you're trying to build for a target in //cc/... you'll need to have an environment that supports the workspace setup.

Based on the error message you may need to install python3-distutils it seems? I'd be curious to see if:

apt list | grep -i distutils

shows anything?

from fhir-examples.

Cam2337 avatar Cam2337 commented on May 8, 2024

We'll look at to see if there's any way we can split this more cleanly too -- as for someone just interested in //cc/..., it seems unnecessary to also provision Python, go, ..., etc.

from fhir-examples.

KiwiFPVHarry avatar KiwiFPVHarry commented on May 8, 2024

after installing pip it has now completed only to get the next error when tryignt o run bazel-bin

bazel build //cc/google/fhir_examples:ParsePatients
Starting local Bazel server and connecting to it...
INFO: Analyzed target //cc/google/fhir_examples:ParsePatients (60 packages loaded, 2452 targets configured).
INFO: Found 1 target...
Target //cc/google/fhir_examples:ParsePatients up-to-date:
bazel-bin/cc/google/fhir_examples/ParsePatients
INFO: Elapsed time: 19.726s, Critical Path: 2.24s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
h@h-virtual-machine:~/fhir-examples$ bazel-bin/cc/google/fhir_examples:ParsePatient $WORKSPACE
bash: bazel-bin/cc/google/fhir_examples:ParsePatient: No such file or directory

from fhir-examples.

Cam2337 avatar Cam2337 commented on May 8, 2024

h@h-virtual-machine:~/fhir-examples$ bazel-bin/cc/google/fhir_examples:ParsePatient $WORKSPACE
bash: bazel-bin/cc/google/fhir_examples:ParsePatient: No such file or directory

Ah I see -- this looks to be an error in the README.md which I've since corrected internally. The corrected documentation will be included in the next push to the public repo.

Try running:

bazel-bin/cc/google/fhir_examples/ParsePatients $WORKSPACE

Which is just a relative path to the compiled binary created from the bazel target: //cc/google/fhir_examples:ParsePatients.

Let me know if that ends up fixing things for you!

from fhir-examples.

KiwiFPVHarry avatar KiwiFPVHarry commented on May 8, 2024

Thank you - running now..should taht take quite some time? running on a Ubuntu VM inside of WIndows

from fhir-examples.

Cam2337 avatar Cam2337 commented on May 8, 2024

It shouldn't be considerably long, maybe a minute or so, to parse all 1000 records. It should be dumping to STDOUT as well as it's making progress. What are you seeing?

from fhir-examples.

KiwiFPVHarry avatar KiwiFPVHarry commented on May 8, 2024

Reading /home/h/fhirdata and blinking cursor...for about 10 minutes already

from fhir-examples.

KiwiFPVHarry avatar KiwiFPVHarry commented on May 8, 2024

did just run it again...cursor stops blinking after a few seconds

from fhir-examples.

Cam2337 avatar Cam2337 commented on May 8, 2024

Yeah something's not right. I'm guessing that the generate_synthea.sh script didn't execute properly, and that you have no files in $WORKSPACE/ndjson. Could you verify if this is true?

ls $WORKSPACE/ndjson/

from fhir-examples.

KiwiFPVHarry avatar KiwiFPVHarry commented on May 8, 2024

all good now..have re-run the synthea script after deleting all but top folder and then all the commands executed successfully..:) thnaks for all the help..:)

from fhir-examples.

Cam2337 avatar Cam2337 commented on May 8, 2024

Glad to hear it! :)

To add some additional context for what you might have encountered -- unfortunately the generate_synthea.sh script can fail certain steps but continue execution and appear as though it succeeded. I noticed, for example, on one Ubuntu VM, that since I didn't have a bazel alias (the correct invocation was bazel-3.2.0), the bazel build @com_google_fhir//java:SplitBundle command would fail but the rest of the script would continue. This resulted in no files output to $WORKSPACE/ndjson.

Because of this, when we eventually would try to execute the compiled ParsePatients binary, we were actually spinning indefinitely within the while loop as no data was ever read, since no files existed within $WORKSPACE/ndjson to begin with. Hence the hanging cursor you were seeing after Reading <workspace> was printed to STDOUT.

I've added additional safety to parse_patients.cc so that it will error and exit clearly if these problems occur. I'll also look into adding some additional safety to generate_synthea.sh.

Glad things are working, thanks for your help and patience! :)

from fhir-examples.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.