
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I am using the code below to extract the list of projects for a hub. I can then iterate through those projects and print out the names of them and everything works fine. However, when I try to access or print the id for a project, it errors out on me.
dataHubs = app.data.dataHubs
for hub in dataHubs:
if hub.name == props['hub']:
dataProjects = hub.dataProjects
for i in range(len(dataProjects)):
thisProject = dataProjects.item(i)
print(thisProject.name) # works
print(thisProject.id) # does not work
I would like to be able to give you the error that comes up, but there doesn't seem to be one. Whatever print command I give within the Spyder IDE does not "work" until I press "Enter" with the cursor in the console of Spyder. (Took about a day to figure that out). When I do that without the print statement for the ID, everything is then printed out just fine. If I add in the print for the ID, I get a string of errors that seems unrelated to the issue.
Here are those errors. The first one results any time you hit enter in the console window of Spyder. The rest seem as if a cascading of some kind prevented a garbage cleaner from working.
This happens whether I try to print the ID or just use it somehow. I just want to know why I can't access the ID and if U could get Spyder to work a little better, that would be great.
File "<string>", line 0
^
SyntaxError: unexpected EOF while parsing
During handling of the above exception, another exception occurred:
SystemError: <built-in function delete_WebRequestEventArgs> returned a result with an error set
During handling of the above exception, another exception occurred:
SystemError: <built-in function delete_DataHubs> returned a result with an error set
During handling of the above exception, another exception occurred:
SystemError: <built-in function delete_DataHub> returned a result with an error set
During handling of the above exception, another exception occurred:
SystemError: <built-in function delete_DataProjects> returned a result with an error set
During handling of the above exception, another exception occurred:
SystemError: <built-in function delete_DataProject> returned a result with an error set
Solved! Go to Solution.