pystrata
pystrata copied to clipboard
Maximum recursion depth exceeded while calling a Python object
I noticed this error occurring in python 3.7 but not in python 3.6. The error occurs when all the soil layers are added (i.e., when I execute this: "pysra.site.Profile(layers)"). Below is some information on where this error occurs.
File "/home1/04482/marafi/anaconda3/lib/python3.7/site-packages/pysra/site.py", line 833, in init self.update_layers() File "/home1/04482/marafi/anaconda3/lib/python3.7/site-packages/pysra/site.py", line 845, in update_layers for layer in self[start_layer:]: File "/home1/04482/marafi/anaconda3/lib/python3.7/collections/init.py", line 1096, in getitem return self.class(self.data[i]) RecursionError: maximum recursion depth exceeded while calling a Python object self.update_layers()
Let me know if you need more information. If you are unable to recreate this error, try using a large number of soil layers (>100).
Are you using the latest version? I thought I resolved this issue.
- Albert
On Sat, Oct 26, 2019 at 11:11 PM Nasser Marafi [email protected] wrote:
I noticed this error occurring in python 3.7 but not in python 3.6. The error occurs when all the soil layers are added (i.e., when I execute this: "pysra.site.Profile(layers)"). Below is some information on where this error occurs.
File "/home1/04482/marafi/anaconda3/lib/python3.7/site-packages/pysra/site.py", line 833, in init self.update_layers() File "/home1/04482/marafi/anaconda3/lib/python3.7/site-packages/pysra/site.py", line 845, in update_layers for layer in self[start_layer:]: File "/home1/04482/marafi/anaconda3/lib/python3.7/collections/init.py", line 1096, in getitem return self.class(self.data[i]) RecursionError: maximum recursion depth exceeded while calling a Python object self.update_layers()
Let me know if you need more information. If you are unable to recreate this error, try using a large number of soil layers (>100).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arkottke/pysra/issues/10?email_source=notifications&email_token=AAH4LM2RMW46F5BVL3S3ZCTQQUWIZA5CNFSM4JFQIIOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HUSUEAA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH4LM3XRUN72YOBTYJM7JLQQUWIZANCNFSM4JFQIIOA .
I don't think 0.4.5 is on pip yet. I have 0.4.4
I am running 0.4.5 right now but noticed another error while running my scripts. The error doesn't like my output collection line. The error message I get is: TypeError: init() takes 2 positional arguments but 5 were given
While I execute this: pysra.output.OutputCollection( pysra.output.AccelerationTSOutput(pysra.output.OutputLocation('outcrop', index=0)), pysra.output.ResponseSpectrumOutput(freqs, pysra.output.OutputLocation('outcrop', index=0), 0.05), pysra.output.ResponseSpectrumRatioOutput(freqs, pysra.output.OutputLocation('outcrop', index=-1), pysra.output.OutputLocation('outcrop', index=0), 0.05), pysra.output.MaxStrainProfile())
Any thoughts?
- v0.4.5 should be on pip now.
- You need to pass the outputs as a list.
Albert
On Tue, Oct 29, 2019 at 1:20 PM Nasser Marafi [email protected] wrote:
I am running 0.4.5 right now but noticed another error while running my scripts. The error doesn't like my output collection line. The error message I get is: TypeError: init() takes 2 positional arguments but 5 were given
While I execute this: pysra.output.OutputCollection( pysra.output.AccelerationTSOutput(pysra.output.OutputLocation('outcrop', index=0)), pysra.output.ResponseSpectrumOutput(freqs, pysra.output.OutputLocation('outcrop', index=0), 0.05), pysra.output.ResponseSpectrumRatioOutput(freqs, pysra.output.OutputLocation('outcrop', index=-1), pysra.output.OutputLocation('outcrop', index=0), 0.05), pysra.output.MaxStrainProfile())
Any thoughts?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/arkottke/pysra/issues/10?email_source=notifications&email_token=AAH4LM57EBJZLDJTQEXDQMDQRCLH7A5CNFSM4JFQIIOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECR6FHY#issuecomment-547611295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH4LM5GEIJFMWDLWKTH743QRCLH7ANCNFSM4JFQIIOA .
This issue is now resolved. Thanks for your help!
On Mon, Nov 4, 2019 at 1:35 PM Albert Kottke [email protected] wrote:
- v0.4.5 should be on pip now.
- You need to pass the outputs as a list.
Albert
On Tue, Oct 29, 2019 at 1:20 PM Nasser Marafi [email protected] wrote:
I am running 0.4.5 right now but noticed another error while running my scripts. The error doesn't like my output collection line. The error message I get is: TypeError: init() takes 2 positional arguments but 5 were given
While I execute this: pysra.output.OutputCollection( pysra.output.AccelerationTSOutput(pysra.output.OutputLocation('outcrop', index=0)), pysra.output.ResponseSpectrumOutput(freqs, pysra.output.OutputLocation('outcrop', index=0), 0.05), pysra.output.ResponseSpectrumRatioOutput(freqs, pysra.output.OutputLocation('outcrop', index=-1), pysra.output.OutputLocation('outcrop', index=0), 0.05), pysra.output.MaxStrainProfile())
Any thoughts?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub < https://github.com/arkottke/pysra/issues/10?email_source=notifications&email_token=AAH4LM57EBJZLDJTQEXDQMDQRCLH7A5CNFSM4JFQIIOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECR6FHY#issuecomment-547611295 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAH4LM5GEIJFMWDLWKTH743QRCLH7ANCNFSM4JFQIIOA
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arkottke/pysra/issues/10?email_source=notifications&email_token=ACXVONGYCDIOO3F76GC3OJDQSCIRJA5CNFSM4JFQIIOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDAZL5A#issuecomment-549557748, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXVONH6WFZUAQBDYMPKRJ3QSCIRJANCNFSM4JFQIIOA .