Jump to content

Mark Derbecker

Seeq Team
  • Posts

    71
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Mark Derbecker

  1. @Jess that would indicate that the workbook you're trying to push to hasn't been shared with Write privileges with whatever user is executing the `spy.push()` command. If you're still having trouble after checking the access control, please include the call stack of the error so we can troubleshoot further.
  2. Yes-- this bug is addressed in SPy v190.5, which will be released to PyPI by the end 2023.
  3. @Johannes Sikstrom I think this is a bug in the SPy framework. It's not yet obvious what the problem is by looking at your code, I think I will need to see it in action. I will log a support ticket on your behalf and follow up with you there.
  4. Hi Chris, (I am assuming you are not using Seeq Data Lab, please correct me if I'm wrong.) Seeq's SPy library is recommended for Python scripts, as it contains higher-level functions for common use cases, and it employs Pandas DataFrames as the primary data structure for input and output. seeq-spy is a "wrapper" around the seeq REST API Python SDK. To use SPy in Seeq Server R62.0.9, first install the seeq module like so: pip install seeq~=62.0 Then install the latest version of SPy: pip install seeq-spy Then use the documentation for SPy found here: https://python-docs.seeq.com/user_guide/Tutorial.html
  5. I'm not sure-- you'll have to step through the script and try to discern where that value is being written.
  6. > It looks like something gets stuck anytime you write to UIConfig for any item that carries over to all items? I wouldn't expect so-- otherwise we'd have a lot of problems created by writing UIConfigs.
  7. Correct: The problem is not related to the formula, the problem is that an invalid UIConfig property was somehow posted. You can fix it by posting the valid UIConfig with the capitalization fixed.
  8. The problem is that `FALSE` is capitalized, which is invalid JSON. It needs to be `false`. I plugged it into JSON Pretty Print:
  9. OK as I suspected, I think there's a JSON syntax error in the UIConfig property for the problematic item. Go into the API Reference, then go to `GET /items/{id}` and copy/paste the item's ID there. You should get back a bunch of JSON that includes the UIConfig property. Can you copy/paste that into this thread?
  10. > When I try to open the item properties, the worksheet seems to crash and reverts to the home folder. This is the clue we'll need to drill down on. Pat if you're using Chrome, open up the Developer Tools with Ctrl+Shift+I. Then click on the Console tab, which will allow us to see any JavaScript errors. Now recreate this problem (where it crashes & reverts to the home folder), and I'm guessing there will be some errors that show in red in the Console. Please copy & paste them into a reply to this thread (be generous with how much you copy/paste, the more info we have the better).
  11. That's the number of unique items, and it includes lots of things: - Worksheets - Worksteps (these are the individual worksheet "states" that define the displayed items and all other worksheet configuration at a particular point in time) - Calculated items (signals/conditions/scalars/metrics/histograms) -- this referred to as the "item inventory" - Journal text - Journal images The things that generally take a long time are the Calculated items. You can try specifying `include_inventory=False` during your push to see if that's a lot faster.
  12. Hi Willem, what that code ends up doing is creating a "blank" Topic object (on the first line) rather than pulling the existing Topic from Seeq. As a result, you'll always be overwriting what the other code pushes. So do this at the beginning instead: workbooks = spy.workbooks.pull({'ID': '<id_of_workbook>'}) topic = workbooks['RPB-4 performance'] One thing to note however is that add_image() is going to add on to the existing Topic Document, and so you may get an endless addition of images, which is also probably not what you want. Is there any way for you to get these two separate pieces of code to execute at the same time?
  13. Pat, I believe I've found the problem, and it looks like SPy is incorrectly throwing an error. Actually, the operation is completely successful, and the journal links should work. Can you confirm that? I'll fix the error-throwing problem.
  14. Your colleague could also specify the workbook ID directly, something like this: spy.push(metadata=build,workbook='09A863DF-53F0-4D2A-BD60-A9DEDF07BC2E')
  15. In order to make something appear in the Shared folder, you must give people/groups read permission in the workbook's Access Control List. You can specify User Groups and/or a particular set of Users. Take a look at https://python-docs.seeq.com/user_guide/spy.acl.html#modifying-acls-for-pushed-workbooks for info on how to achieve this.
  16. Pat can you tell me what version of SPy you're on? You can do print(spy.__version__)
  17. Well, actually, that all SHOULD work the way you intend it -- where you have a Journal that opens those preset visualizations. But it's not working, and I think it's a bug. Can you execute the following lines at the bottom of your notebook and send me the resulting zip files? spy.workbooks.save(spy.workbooks.load('./PJD_WorksheetTemplate'), 'ForMark-Templates.zip') spy.workbooks.save(WorkbookInstance_List, 'ForMark-PulledWorkbook.zip') (I agree with your comment -- the Mustache stuff won't help here.)
  18. OK-- so my guess is that the Journal links don't work properly, is that true? (That's what the error message boils down to.) I think everything else about the worksheet(s) should be correct... am I right?
  19. Pat, in the ipynb file you attached, it's showing that the error is AttributeError: 'Analysis' object has no attribute 'parameters' Can you attach a notebook with the dependency error showing (that you took a screenshot of above), and with the stack trace expanded? Also, for your template worksheet, do you have a Journal with links to worksteps in it? I think that may be causing a problem. (It shouldn't cause a problem... but I need to see what the Journal looks like.)
  20. It's a bit hidden in the documentation, but in this scenario where you're wanting to add several worksheets that use the same template, you'll need to use the copy() function (see below). You must supply a label argument. You'll do this before you assign a name and before you append to the worksheets list.
  21. Sorry, try this: # Pull the workbook workbooks = spy.workbooks.pull(workbook_id) workbook = workbooks[0] # Add the template worksheet if template_worksheet.name in workbook.worksheets: workbook.worksheets[template_worksheet.name] = template_worksheet else: workbook.worksheets.append(template_worksheet) # Push back up spy.workbooks.push(workbook)
  22. I think this should work: # Pull the workbook workbook = spy.workbooks.pull(workbook_id) # Add the template worksheet if template_worksheet.name in workbook.worksheets: workbook.worksheets[template_worksheet.name] = template_worksheet else: workbook.worksheets.append(template_worksheet) # Push back up spy.workbooks.push(workbook)
  23. Pat if you're only pushing a workbook (and not accompanying that workbook push with calculations as well), you'll use `spy.workbooks.push()` instead of `spy.push()`. Take a look at the "Using Pre-existing Signals/Conditions/Scalars etc" section of the Workbook Templates.ipynb documentation file:
  24. 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
×
×
  • Create New...