<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Flume Tutorial Error with Python Script in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138508#M101139</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;@Benjamin Leonhardi&lt;/A&gt; Interesting!  You are right, I was using Notepadd++.  However, when I opened the script in vi, there are additional lines not visible in Notepad++.  See the attached picture.  I changed the return on line 98 to be commented as suggested on the tutorial comments and the script executed.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/2035-py3.png"&gt;py3.png&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Feb 2016 00:01:31 GMT</pubDate>
    <dc:creator>daniel_hendrix</dc:creator>
    <dc:date>2016-02-12T00:01:31Z</dc:date>
    <item>
      <title>Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138501#M101132</link>
      <description>&lt;P&gt;I am working through this &lt;A href="http://hortonworks.com/hadoop-tutorial/how-to-refine-and-visualize-server-log-data/"&gt;tutorial&lt;/A&gt; and I'm encountering the error shown below.  I see that others have experienced it to from looking at the comments below the walk through.  I believe I have successfully completed this tutorial before.  Any ideas on how to resolve this?&lt;/P&gt;&lt;PRE&gt;[root@sandbox home]# python generate_logs.pyFile “generate_logs.py”, line 98return resultsSyntaxError: ‘return’ outside function&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Feb 2016 21:41:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138501#M101132</guid>
      <dc:creator>daniel_hendrix</dc:creator>
      <dc:date>2016-02-11T21:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138502#M101133</link>
      <description>&lt;P&gt;Just downloaded and ran the generate_logs file in the sandbox and it works fine for me. Are you sure you didn't modify the script somehow? Sometimes python is very sensitive to tab changes. Its easy for a return to suddenly be a couple characters more to the left or right and with that not in the function anymore.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 22:50:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138502#M101133</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-02-11T22:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138503#M101134</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;@Benjamin Leonhardi&lt;/A&gt; Thanks Benjamin.  I'm currently completing the lengthy re-download and install of the SBX and will also re-download the script.  Will let you know if I still receive an error.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 22:58:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138503#M101134</guid>
      <dc:creator>daniel_hendrix</dc:creator>
      <dc:date>2016-02-11T22:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138504#M101135</link>
      <description>&lt;P&gt;And if you do and still have the problem, have a look into the script file. It is not that long and it should be pretty obvious if a return is not lined up with the function before it. The comment says that he saw some intendation errors. Since I do not have the problems they must have been added perhaps by opening the file in Windows or something.  Or there was a bad version hosted that was updated? Not sure. &lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 23:02:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138504#M101135</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-02-11T23:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138505#M101136</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;@Benjamin Leonhardi&lt;/A&gt; I'm almost at the part where I should run the script.  However, Ive noticed two other items about the tutorial. &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;When I execute the mv command for flume.conf, I am told it already exists and will be overwritten.&lt;/LI&gt;&lt;LI&gt;The log4jproperties file is already configured correctly.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 11 Feb 2016 23:28:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138505#M101136</guid>
      <dc:creator>daniel_hendrix</dc:creator>
      <dc:date>2016-02-11T23:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138506#M101137</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;&lt;/A&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;@Benjamin Leonhardi&lt;/A&gt; Same error message received.  Below is what is in the script which I re-downloaded and unzipped.  I would paste the code from the script but it exceeds the 600 character limit.  Instead Ive attached pictures.  I see no issues with indentation of return statements nor do I see anything on line 98.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6091i8A7E90274D1C6D4F/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="py2.png" title="py2.png" /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6093iDB173F9A0B4DD824/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="py1.png" title="py1.png" /&gt;</description>
      <pubDate>Thu, 11 Feb 2016 23:30:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138506#M101137</guid>
      <dc:creator>daniel_hendrix</dc:creator>
      <dc:date>2016-02-11T23:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138507#M101138</link>
      <description>&lt;P&gt;Can you have a look at the file in the sandbox ( cat vi ). Might be different from windows  ( Thats notepad++ right? ) &lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 23:52:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138507#M101138</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-02-11T23:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138508#M101139</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;@Benjamin Leonhardi&lt;/A&gt; Interesting!  You are right, I was using Notepadd++.  However, when I opened the script in vi, there are additional lines not visible in Notepad++.  See the attached picture.  I changed the return on line 98 to be commented as suggested on the tutorial comments and the script executed.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/2035-py3.png"&gt;py3.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 00:01:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138508#M101139</guid>
      <dc:creator>daniel_hendrix</dc:creator>
      <dc:date>2016-02-12T00:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138509#M101140</link>
      <description>&lt;P&gt;Did it also generate the logs? Its a bit weird, that is what I just downoaded from the tutorial link: &lt;/P&gt;&lt;P&gt;So for me it needed  the return, it needs to be in the same line as the for and I don't have the main at the top you have. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2046-screen-shot-2016-02-11-at-40527-pm.png" style="width: 1172px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/21908i251D6731C53FCA1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2046-screen-shot-2016-02-11-at-40527-pm.png" alt="2046-screen-shot-2016-02-11-at-40527-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 08:37:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138509#M101140</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2019-08-19T08:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138510#M101141</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;@Benjamin Leonhardi&lt;/A&gt; The main() at the top of mine is the one at the bottom of yours.  My screenshot from vi is showing that line plus additional lines which were not visible in Notepad++.  Sadly, no, nothing is being written to /flume/events&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 00:23:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138510#M101141</guid>
      <dc:creator>daniel_hendrix</dc:creator>
      <dc:date>2016-02-12T00:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138511#M101142</link>
      <description>&lt;P&gt;Seriously no idea. Last attempt here is my script:  &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/2047-generate-logspy.zip"&gt;generate-logspy.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But I swear I just downloaded it from the url you added&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 00:24:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138511#M101142</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-02-12T00:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138512#M101143</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;@Benjamin Leonhardi&lt;/A&gt;  Me either.  Just replaced my file with yours and receive the same error about line 98 which I would have received before commenting out the return statement on that line&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 00:29:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138512#M101143</guid>
      <dc:creator>daniel_hendrix</dc:creator>
      <dc:date>2016-02-12T00:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Flume Tutorial Error with Python Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138513#M101144</link>
      <description>&lt;P&gt;A poltergeist? I don't have a line 98, neither in Macos nor in linux. &lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 00:30:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Flume-Tutorial-Error-with-Python-Script/m-p/138513#M101144</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-02-12T00:30:04Z</dc:date>
    </item>
  </channel>
</rss>

