hark-python3のチュートリアルでエラー

HARK FORUM hark-python3のチュートリアルでエラー

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #897
    kei_15
    Participant

      以前の投稿に返信をしようとしたのですが、反映されがされないため新規投稿いたします。
      教えて頂いたhark-python3のチュートリアルでチュートリアル1は無事確認できましたが、チュートリアル2で、指定されたネットワークファイルを作成し、
      $ batchflow tutorial2.n
      を行うと以下のエラーが出ます。

      Start HARK middleware:
          network: tutorial2.n
          execute: tutorial2.n
          process: local
          toolbox: ['/usr/local/lib/hark/toolbox', '/usr/lib/hark/toolbox']
          args:    []
      Node::addFactory : The factory (AND) already exists. Ignoring the new one.
      Node::addFactory : The factory (Constant) already exists. Ignoring the new one.
      Node::addFactory : The factory (Delay) already exists. Ignoring the new one.
      Node::addFactory : The factory (Equal) already exists. Ignoring the new one.
      Node::addFactory : The factory (Greater) already exists. Ignoring the new one.
      Node::addFactory : The factory (IF) already exists. Ignoring the new one.
      Node::addFactory : The factory (InputStream) already exists. Ignoring the new one.
      Node::addFactory : The factory (IterCount) already exists. Ignoring the new one.
      Node::addFactory : The factory (Iterate) already exists. Ignoring the new one.
      Node::addFactory : The factory (NOP) already exists. Ignoring the new one.
      Node::addFactory : The factory (OR) already exists. Ignoring the new one.
      Node::addFactory : The factory (Sleep) already exists. Ignoring the new one.
      Node::addFactory : The factory (Smaller) already exists. Ignoring the new one.
      # Error setMoudleVersion(): HARKBASE already exists.sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)
      ValueError: tuple.index(x): x not in tuple
      Traceback (most recent call last):
        File "/usr/local/bin/batchflow", line 11, in <module>
          load_entry_point('harkmw==3.0.7', 'console_scripts', 'batchflow')()
        File "/usr/local/lib/python3.5/dist-packages/harkmw-3.0.7-py3.5-linux-x86_64.egg/harkmw/main.py", line 102, in main
          app.run(process_name)
        File "/usr/local/lib/python3.5/dist-packages/harkmw-3.0.7-py3.5-linux-x86_64.egg/harkmw/process.py", line 65, in run
          network = builder.build(self.document, self.params, process_name)
        File "/usr/local/lib/python3.5/dist-packages/harkmw-3.0.7-py3.5-linux-x86_64.egg/harkmw/logic/builder.py", line 36, in build
          network = self.build_network(document, None, network_def, parameters, process_name)
        File "/usr/local/lib/python3.5/dist-packages/harkmw-3.0.7-py3.5-linux-x86_64.egg/harkmw/logic/builder.py", line 97, in build_network
          self.connect_link(network, node, output.name, output_collector, externalName)
        File "/usr/local/lib/python3.5/dist-packages/harkmw-3.0.7-py3.5-linux-x86_64.egg/harkmw/logic/builder.py", line 196, in connect_link
          proxy.connect_native_input(node_from, terminal_name_from)
        File "/usr/local/lib/python3.5/dist-packages/harkmw-3.0.7-py3.5-linux-x86_64.egg/harkmw/logic/proxy.py", line 56, in connect_native_input
          self.native.connect_input(node.native_node, terminal)
      RuntimeError: HARK-Middleware: HARK exception thrown at harkmw/src/proxy.cc:163 (Proxy_connect_input): /home/user/scripts/packaging/HARK-System/hark-python2/src3/PyCodeExecutor3.cc line 423: Node PyCodeExecutor3 (type 15PyCodeExecutor3) Error during translate Output (samplecode::PyCodeExecutor3f5dd7b29_3dfb_4903_8430_e360f2806077::HarkNode) Output Name: OUTPUT of ID: 0 is not found in outputNames.
      candidates are:::
      output
      

      自分で作成したtutorial2.nも添付致します。
      なにか心当たりあればご教授いただきたいです。
      よろしくお願い致します。

      Attachments:
      #907
      nterakado
      Moderator

        お問い合わせありがとうございます。

        ネットワークファイルを確認させていただきましたが、
        PyCodeExecutor3ノードで設定している端子名が大文字になっておりました。
        チュートリアルで例示しているPythonのsamplecodeでは端子名を小文字としておりますので、
        そのまま記述していた場合は定義されていない端子にアクセスしようとしてエラーとなります。
        以前に回答させていただいたように、Pythonファイルの記述とネットワークファイルのPyCodeExecutor3ノードに追加した端子名は一致させてください。

        また、
        Node::addFactory : The factory (ノード名) already exists. Ignoring the new one.
        というメッセージが多発しているようですが、
        こちらは以前のバージョンのHARKとパスが競合している場合に発生します。
        flowdesigner-0.9.1-harkをアンインストールして頂くことで、改善するかと存じます。
        ソースからコンパイルしていた場合は、$ sudo make uninstallでアンインストール可能です。

        以上、よろしくお願いいたします。

        • This reply was modified 4 years, 9 months ago by nterakado.
        • This reply was modified 4 years, 9 months ago by nterakado.
        • This reply was modified 4 years, 9 months ago by nterakado.
        #916
        kei_15
        Participant

          ご返信ありがとうございます。

          指摘していただいた通りにアンインストールとコードの修正を行い、無事に動作確認を行うことができました。
          丁寧な解説ありがとうございました。
          引き続きHARKを用いて独自のシステム構築を図っていきます。

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.