Forums Anyscript.org  

Go Back   Forums Anyscript.org > Professional Forum > Debug model

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2017, 01:00 PM
ogulcanguldeniz ogulcanguldeniz is offline
Junior Member
 
Join Date: Jul 2017
Posts: 5
Default AnyPyTools - KeyError

Dear All,

I am trying to run a model from python with the help of anypytools. Python script we used works perfect on a different computer but when I try to work exactly the same script with same model on my computer I receive a KeyError. I do not know is this the right place to ask, but since I am trying to run Anybody with it, I wanted to ask.

Thank you all, I look forward to hearing from you soon.
Attached Images
File Type: png Screenshot_3.png (92.8 KB, 6 views)
Reply With Quote
  #2  
Old 07-20-2017, 01:44 PM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 940
Default

Hello,

Please update your profile with the name, affiliation.

At the moment I am not sure what is exactly wrong, but I could recommend you to check what version of AnyPyTools are being used. Since there is a difference on 2 computers - most likely the versions are not the same. I would recommend to roll back the AnyPyTools package if it used to work, or update to the newer if it is behind.

If that does not work - please let us know.

Kind regards,
Pavel
Reply With Quote
  #3  
Old 07-21-2017, 01:56 PM
ogulcanguldeniz ogulcanguldeniz is offline
Junior Member
 
Join Date: Jul 2017
Posts: 5
Default

Hello again,

Thank you for your fast return. As you said I updated my profile. I am using Anaconda 3 with spyder (python 3.6)." https://github.com/AnyBody-Research-Group/AnyPyTools ", I used this steps to setup Anaconda 3 and the other computer that I mentioned also uses Anaconda 3 with spyder (python 3.6).

I used Anaconda command prompt to install anypytools. As far as I know anypytools I downloaded in that way is the latest version. Is it possible that earlier versions might not working in the newest update? Also I would be really glad if you tell me how can I learn the version of the anypytools that I am currently using.

I recently formatted my computer, and installed those softwares again, result is same, nothing changed. I believe my default spyder settings are causing the problem but I am not sure which settings.

Iif necessary, I can provide any additional information.

Thank you.
Ogulcan Guldeniz

Last edited by ogulcanguldeniz; 07-21-2017 at 02:02 PM.
Reply With Quote
  #4  
Old 07-21-2017, 03:24 PM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 940
Default

Ogulcan,

Thank you.

"conda info anypytools" to see the version number.

I am still not quite sure what is wrong. Could you try to run from Jupyter: "jupyter notebook"? If that does not eliminate the problem. Then it is not environment specific. Do you run process many models at the same time? My colleagues just had a similar issue and it helped to reduce this number, which could also be a computer-specific, which would explain how it works on another machine if everything else is the same.

Kind regards,
Pavel
Reply With Quote
  #5  
Old 07-22-2017, 01:21 AM
ogulcanguldeniz ogulcanguldeniz is offline
Junior Member
 
Join Date: Jul 2017
Posts: 5
Default

Hey Pavel,

To begin with I checked my anypytools version. I am still not sure which version is the correct one so I attached a text file of the output that I get from command prompt about my version data.

I tried Jupyter also and get the same error. To the same text file right after version informations, I included the complete error explanation that I get from Jupyter. I thought it might be important to solve this issue.

Also like you said, I decreased the number of processes working at the same time to 1. did not made a difference. I did this change by changing this line.
" app = AnyPyProcess(num_processes = 1) "

Thank you for your support once again, I hope those informations may lead a solution to this issue. I look forward to hearing from you soon.

Best Regards,
Ogulcan Guldeniz
Attached Files
File Type: txt AnyPyTools_Info.txt (6.4 KB, 5 views)
Reply With Quote
  #6  
Old 07-31-2017, 11:25 AM
melund3 melund3 is offline
Junior Member
 
Join Date: Jul 2017
Posts: 6
Default

Hi Ogulcanguldeniz

You should use `conda list anypytools` to see which version of anypytools you have installed (if any.) `conda info` just shows you what versions are available online.

The error you are getting just indicate that the data is not available in your results. Why that happens is hard for me to say, if I can't see more of your code.

It could for example be:

1. You are not outputting the variable in the macro. (This is probably not the case since you wrote that the same script worked on another computer).

2. One of you macro simulations fails before it gets to the point where the variable are 'Dump'ed. This can easily happen if the model is not the same between the two computers or if there are issues with the version of AnyBody you are using.

Try to inspect what data is available in the `results` variable. You can maybe do that in Spyder, or just do `print(results[0].keys())`

If it doesn't solve your problem do you mind opening a new issue in the AnyPyTools issue tracker:
https://github.com/AnyBody-Research-...PyTools/issues

You can also find more information on the documentation web page for AnyPyTools:
https://anybody-research-group.githu...ypytools-docs/

Regards,
Morten
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:38 AM.