Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Problem in Nifi-MiNifi Flow -- /usr/bin/python: can't find '__main__.py' in '' Error

Highlighted

Problem in Nifi-MiNifi Flow -- /usr/bin/python: can't find '__main__.py' in '' Error

New Contributor

I am following the tutorial-

Analyze IoT Weather Station Data via Connected Data Architecture, tutorial-820.

In MiNifi flow, from Execute Processor, data is not going further.

When, I saw the data Provenance of PutHDFS processor, it shows the error-

/usr/bin/python: can't find '__main__.py' in ''

What to do? Someone please help.

5 REPLIES 5

Re: Problem in Nifi-MiNifi Flow -- /usr/bin/python: can't find '__main__.py' in '' Error

Contributor

@Divya Sodha,

Can you share the python script you are using? Also did you write out the script or download it?

Can you also send me your minifi logs: cd minifi-0.4.0/logs?

Thanks,

James

Re: Problem in Nifi-MiNifi Flow -- /usr/bin/python: can't find '__main__.py' in '' Error

New Contributor

@jmedel

Hello Sir,

I have written out the script.

After I made changes in the script, the new error is :-

python: can't open file '/home/pi/WeatherStation.py': [Errno 2] No such file or directory

I am attaching the files containing contents of python file as well as minifi log file.

Please explain what the problem is and how to solve it.

Thank you.

python.txt

minifi-app-log.txt


Re: Problem in Nifi-MiNifi Flow -- /usr/bin/python: can't find '__main__.py' in '' Error

Contributor

@Divya Sodha,

Does the python script have the same name as "WeatherStation.py" or is it changed? Is the MiNiFi flow that was built in NiFi running on the NiFi UI or was the NiFi template (MiNiFi flow) converted to MiNiFi yaml file and transported over to the Raspberry Pi? Are you running the MiNiFi flow using ./bin/minifi.sh start?

In your minifi-app log, I noticed your MiNiFi instance is having trouble communicating with the NiFi node on HDF, is that still occurring?

Re: Problem in Nifi-MiNifi Flow -- /usr/bin/python: can't find '__main__.py' in '' Error

New Contributor

@jmedel

Sir,

My python script has same name as WeatherStation.py but the code is different.

The NiFi template(MiNifi flow) was converted to MiNiFi yaml file and transported over to the Raspberry Pi.

Yes, I am running the MiNiFi flow using ./bin/minifi.sh start.

I am able to ping from Hortanworks sandbox to raspberry pi. But not able to ping from raspberry pi to Hortanworks or laptop. I am not able to understand the problem.

Re: Problem in Nifi-MiNifi Flow -- /usr/bin/python: can't find '__main__.py' in '' Error

Contributor

@Divya Sodha,

Can you add a photo of your ExecuteProcess processor properties tab that shows the path used to execute the python script? On your Raspberry Pi, does the location you have the python script match with the configuration specified in the MiNiFi processor?

Perfect on the conversion part. For your ping issue, which Hortonworks Sandbox are you using Docker, VirtualBox or VMware? What is the Network Adapter used for the environment (Docker, VirtualBox, VMware) your Sandbox runs on? Also can your Sandbox ping google.com or another site?

Don't have an account?
Coming from Hortonworks? Activate your account here