Jump to content

Mark Derbecker

Seeq Team
  • Posts

    72
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Mark Derbecker

  1. Hi Pat, here's the documentation. There's not much there, but this is it: https://python-docs.seeq.com/reference/submodules/workbooks.html#seeq.spy.workbooks.TopicDocument.report
  2. OK Pat here is the fixed-up ipynb file. Do a search for "MarkD says" and you'll see how I've left comments to explain what changes I made. topic_document_deprecated (1).ipynb
  3. Can you post your ipynb file Pat, I think that it will be fastest to show you what I mean if I can just rewrite your code.
  4. It looks like you're working with a TopicDocument. As per the error message, you would just change `document` to `report`.
  5. OK great-- it'll end up being someone else to answer that question because I'm not sure myself.
  6. In the code I gave you, you'll see I use the `FormulaParameters` variable like so: 'Formula Parameters': FormulaParameters The only thing wrong with the code I gave you (so far) is that you're not handling the case where spy.search() is returning zero rows. You'll need to debug that and put in error handling code. > Has anyone ever done this successfully? Yes. However, I'd say that you have to understand some Python basics: What is a dictionary and how does it work, what is its syntax; what is a set and what is its syntax. I supplied some references above for learning.
  7. This error is coming from Pandas and indicates that your search result returned zero rows. You'll need to check to see that your spy.search() result includes at least one row. I think it's important that you step through your code and really try to understand what each line is doing, it'll be too hard for us to have a back and forth for every error you encounter. There are a bunch of online resources for understanding Python and Pandas basics: https://www.google.com/search?q=best+resource+for+learning+python+and+pandas
  8. PM_SIM_SetModels_230416 - MarkD Edits.ipynb Pat, here's an updated version. I'm not able to test it because I don't have your data sets. But the primary difference is that I replaced this line that dynamically assigns values to local variables: # locals()[InputVar + '_ID'] = spy.search({ with code that just stores the IDs in a dictionary: SearchResults = spy.search({ 'Name': InputVar + '_ID', 'Scoped To':scopedtoid }) InputVar_ID = SearchResults.iloc[0]['ID'] TagIDs[InputVar] = InputVar_ID You can see that instead of constructing a string, we construct a `FormulaParameters` dictionary where the keys are variable names and the values are IDs. If it doesn't work right away, it won't surprise me because I couldn't test it. Please take a little time debugging it by adding print statements and walking through it so you have a feel for what it's doing..
  9. Any chance you could just upload your entire .ipynb file? That way I can propose a rewrite that doesn't involve constructing a string.
  10. You'll want to click Show Stack Trace. I believe that error is likely coming from Pandas, indicating that one of your DataFrames is empty. The reason I say this is an unorthodox method is that it's very hard to debug. It would be better to deal with the variables names in string form rather than assigning them to Python variables and then constructing code via string concatenation. I.e., instead of creating a variable called PulpEye_BlendFreeness_ID, just keep a DataFrame with row a row whose Name is PulpEye_BlendFreeness and has an ID column. ChatGPT may be able to help you understand your code and suggest a better method overall. You can paste it in and ask it to help you structure it in a more supportable way.
  11. Hmmm, you're constructing Python code within a string... so I think you could add FormVarListDict = eval('{' + FormVarList + '}') and then use it as 'Formula Parameters': FormVarListDict It's unorthodox but I think it would work.
  12. Can you post a good chunk of your code as text so it's easier to see what you're doing in the lines above your screenshot?
  13. Formula Parameters needs to be a Python dictionary, where the keys are the variable names and the values are the IDs, or a Pandas DataFrame row containing the ID. So instead of constructing a string on line 60, you'll need to create a dictionary and assign rows from a spy.search() call. You can see how to do it near the end of the SPy Tutorial: https://python-docs.seeq.com/user_guide/Tutorial.html#pushing-a-new-condition-to-seeq
  14. I'm not sure what's happening, but I'd recommend uninstalling all "private" versions of the seeq module. "Private" versions are those that are found in /home/datalab/.local. That way you will be using the version of seeq module that is supplied with Data Lab.
  15. Hi Mohamed, do you have a question about what the error message is trying to tell you? Have you tried the command it recommends that you execute at the end of the message?
  16. Hi Wen, You should be able to supply the "errors" argument to skip over the error: spy.pull(items, errors='catalog')
  17. Hi Wen-- Maximum Interpolation is special, it has to be "overridden". Just change property_name to 'Override Maximum Interpolation'.
  18. It is better to correlate the calculation variables with the stored signals by using the ID -- the name of the variable can be anything, so it is not a reliable link between the two.
  19. Hi Mohammad, When you include the "all_properties=True" argument in spy.search(), you will receive a "Formula Parameters" column that has the variables as a list of strings in the form "variable_name=item_id" like so: To get exactly the DataFrame you're asking for in your original post, you can then use the following DataFrame manipulation code and another call to spy.search(): variables_df = pd.DataFrame([{'Variable Name': f"${fp.split('=')[0]}", 'ID': fp.split('=')[1]} for fp in search_df.iloc[0]['Formula Parameters']]) merged_df = spy.search(variables_df) merged_df = merged_df[['ID', 'Name', 'Type']] merged_df = merged_df.merge(variables_df, on='ID') merged_df It'll look like this:
  20. There is a new capability in SPy version 184.12 (released today to PyPI) called Workbook Templates that I believe fits the bill for what @hanskanns wants to do. To see it in action, you'll need to install the new version of SPy using the instructions at https://pypi.org/project/seeq and then get the updated documentation by doing spy.docs.copy() Then you'll see a new documentation notebook called Workbook Templates.ipynb that will walk you through it. You can put some "placeholders" for text fields that you want to replace using syntax like {{MyTextField}} in your Organizer Topic. If you end up trying it, let us know if you have any problems getting it to work.
  21. OK thanks Ivan. I think this is a bug on our side. We're looking into it. But in the meantime, I think you should be able to drop the `Permission Inheritance Disabled` column from the DataFrame before pushing it. That should solve the issue. Can you try that?
  22. Ah, sorry, maybe my first instinct is wrong. "May not modify the property directly" seems to indicate that we're sending that property incorrectly. But still can you tell me what version of SPy you are using? You can do `spy.__version__` in a notebook cell to see it.
  23. Hey Ivan-- that looks to me like a SPy version mismatched to the server. What is the version of SPy and the version of the server you are using?
  24. Hi Nate, There are currently no storage retention limitations on such data. Seeq stores this data in its main data storage area (along with workbook definitions, calculation definitions etc). Seeq is not meant to be a "system of record" for pushed data -- we recommend that you always retain the ability to recreate this data from original sources if necessary. But to be clear, Seeq will currently not pare down this data using any sort of retention policy. Mark
  25. Frequently Asked Questions regarding the Log4Shell vulnerability and Seeq Does Seeq or any of its constituent 3rd-party components use Log4J? No. Seeq uses a library called Logback, which is not vulnerable to the high-criticality Log4Shell exploit (CVE-2021-44228). There is a related vulnerability (CVE-2021-42550) in Logback that the security community has deemed as medium criticality given that it requires access to logback's configuration file by the attacker, sign of an already compromised system. According to Seeq's 3rd Party Vulnerability assessment process, CVE-2021-42550 has been assessed as low criticality in the context of the Seeq system but the library will nonetheless be upgraded as part of an upcoming Seeq point release. My virus scanner is flagging log4j-over-slf4j-1.7.7.jar as vulnerable. What's up with that? Virus scanners, depending on their level of sophistication, may flag a file named cassandra/files/lib/log4j-over-slf4j-1.7.7.jar in the Seeq installation folder for Seeq versions R50 and older. This component does not suffer from the Log4Shell vulnerability, it is an adapter layer that is only used if Log4J is also used somewhere in the system. See http://slf4j.org/log4shell.html for more information. The component was part of the Cassandra NoSQL database system, a sub-component of the overall Seeq system in versions R50 and earlier. Cassandra has been removed in R51 and later. I see something called log4js and log4javascript in the webserver folder of the Seeq installation. What about that? Those files are related to a Javascript library that performs a similar logging function as Log4j but does not contain the vulnerability. More information: https://github.com/log4js-node/log4js-node/issues/1105
×
×
  • Create New...