LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Output multifile .brd on the server

    Employee
    Posted 01-23-2012 07:27

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ThomasT

    Do you guys know the reason why brain won let me output to BRD when i have the graph running on the server.
    I can easily output the files for

    "/opt/app/braindata/data/output/OutputBRD/"+'Date for Start of Charge'+".csv"

    but not

    "/opt/app/braindata/data/output/OutputBRD/"+'Date for Start of Charge'+".brd"

    It gives me the following error:
    Got Python exception

    Installing log (01/23/2012 14:29:14) ...
    2012-01-23 14:29:15; Level: 3; Type: 0; Desc: "[Errno 13] Permission denied: '/opt/app/braindata/data/output/OutputBRD/2012-01-22.brd'"; File: "ls.brain.node.brainpython.python2implementationfi le"; Line: 85; Context: "pump( ) - Exception"
    2012-01-23 14:29:15; Level: 3; Type: 0; Desc: "Error pumping node (Traceback (most recent call last):
    File "/opt/app/brain/lib/python/lavastorm/brain/python1.py", line 913, in Run
    while n.pump(quant):
    File "/opt/app/brain/tmp/brain/Talk+Udland3/default/temp.yocto.4113.5190.1327325354944.prop", line 85, in pump
    self.writerDict[filename] = csv.writer(file(filename, 'wb'), delimiter = self.columnDelimiter, doublequote = self.bDoubleQuote, escapechar = self.escapeCharacter, lineterminator = self.recordDelimiter, quotechar = self.quoteCharacter, quoting = self.whenToQuote)
    IOError: [Errno 13] Permission denied: '/opt/app/braindata/data/output/OutputBRD/2012-01-22.brd'
    )"; File: "ls.brain.node.brainpython.python2implementationfi le"; Line: 85; Context: "pump( ) - Exception"
    Uninstalling log (01/23/2012 14:29:15) ...

    Error in sys.excepthook:Traceback (most recent call last): File "/opt/app/brain/lib/python/lavastorm/brain/python1.py", line 948, in <lambda> return lambda exc, value, tb: Python1ExceptHook(control, exc, value, tb)TypeError: 'NoneType' object is not callableOriginal exception was:Traceback (most recent call last): File "/opt/app/brain/tmp/brain/Talk+Udland3/default/temp.yocto.4113.5191.1327325354944.prop", line 1, in <module> import lavastorm.brain.python1 File "/opt/app/brain/lib/python/lavastorm/brain/python1.py", line 957, in <module> runMain() File "/opt/app/brain/lib/python/lavastorm/brain/python1.py", line 955, in runMain raise BrainNodeException, "Encountered error running node"lavastorm.brain.python1.BrainNodeException: Encountered error
    running node




    Here is the node:

    node:Output_Delimited_Multifile_2
    bretype:prototype::Output Delimited (Multifile)
    editor:sortkey=4ee9db0a3c451527_3
    input:@43c680084b824568/=Change_date_to_string.40fd2c7420761db6
    output:4f1d39e8067b1d95/in1=
    prop:FieldDelimiter=\t
    prop:FieldNames=Name:Type
    prop:FilenameExpr=<<EOX
    "/opt/app/braindata/data/output/OutputBRD/"+'Date for Start of Charge'.str()+".brd"



    EOX
    prop:RecordDelimiter=\r\n
    editor:XY=1500,70
    end:Output_Delimited_Multifile_2


  • 2.  RE: Output multifile .brd on the server

    Employee
    Posted 01-23-2012 08:15

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ThomasT

    It is the Unix server that doesn like the "-" in the "2012-01-22" in the string.
    Replacing the "-" will export into brd..
    It is not the omptimal solution, but it works..


  • 3.  RE: Output multifile .brd on the server

    Employee
    Posted 01-23-2012 09:59

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Are you sure there wasn't a file already there?

    You are getting a permission denied error, which could arise if the file already existed and you didn't have writes to overwrite it. I am not aware of any known issue with a "-" in the name of a file, and I was just able to produce one myself, using your node.

    I suspect there is a previous file /opt/app/braindata/data/output/OutputBRD/2012-01-22.brd already there, that you can't overwrite.

    Cheers
    Rich


  • 4.  RE: Output multifile .brd on the server

    Employee
    Posted 01-24-2012 01:57

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ThomasT

    It worked when removing the files.
    Thanks!

    Now i can run it over and over without any problems, even if there are existing files?


  • 5.  RE: Output multifile .brd on the server

    Employee
    Posted 01-24-2012 10:18

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    You should be able to, yes. The node can overwrite the files, it was a permission problem with the previous file's existence. So long as you continue to run the graph with the same installation (so the same server "user" is creating and overwriting the file), you should be fine.

    Cheers
    Rich