<div dir="ltr">thanks Chris and Milton.<div><br></div><div>I had a different error but it was so long ago that I don't recall the messages and I've changed my python setup significantly since so recreating won't be possible.</div><div><br></div><div>Was django used in 2.7?  I don't recall seeing it before and I always used the remote calls to peeringDB and never to a local DB clone.</div><div><br></div><div>My colleague did see the below message yesterday.</div><div><br></div><div><div class="gmail-c-pillow_file__snippet__content" style="box-sizing:border-box;color:rgb(29,28,29);font-family:Slack-Lato,appleLogo,sans-serif;font-size:15px;font-variant-ligatures:common-ligatures"><div class="gmail-CodeMirror gmail-cm-s-default gmail-CodeMirrorServer" style="box-sizing:inherit;height:auto;direction:ltr;overflow:hidden;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:none;border-radius:0px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace"><div class="gmail-CodeMirror-code" style="box-sizing:inherit;outline:none;font-size:13px;line-height:1.50001"><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">Traceback (most recent call last):</pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">  File "./current_peer_analysis.py", line 36, in <module></pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">    sys.exit(main())</pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">  File "./current_peer_analysis.py", line 21, in main</pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">    orgs = pdb.all('net')</pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">  File "/usr/local/lib/python2.7/site-packages/peeringdb/client.py", line 84, in all</pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">    return B.get_objects(B.get_concrete(res))</pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">  File "/usr/local/lib/python2.7/site-packages/peeringdb/backend.py", line 78, in get_concrete</pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">    return self.RESOURCE_MAP[res]</pre></div><div style="box-sizing:inherit;margin-left:32px;padding:0px 8px 4px"><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0px;padding:0px 4px;font-size:inherit;line-height:inherit;font-variant-ligatures:contextual;white-space:pre-wrap;word-break:normal;font-family:inherit;border-width:0px;border-radius:0px;background:transparent;color:inherit;overflow:visible">KeyError: 'net'</pre></div></div></div></div><div class="gmail-c-pillow_file__expandable_pill gmail-c-pillow_file__expandable_pill--collapse" style="box-sizing:inherit;width:692px;display:flex;opacity:0;color:rgb(29,28,29);font-family:Slack-Lato,appleLogo,sans-serif;font-size:15px;font-variant-ligatures:common-ligatures"><br class="gmail-Apple-interchange-newline"></div></div><div>I can open an issue but it is super low priority to resolve as we quickly converted to API and are fully functional. I was just wondering if others generally had issues when moving to python3.</div><div><br></div><div>Thanks</div><div><br></div><div>  -Bill</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 11, 2020 at 12:03 PM Chris Caputo <<a href="mailto:ccaputo@alt.net">ccaputo@alt.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Same here:<br>
<br>
  <a href="https://github.com/peeringdb/django-peeringdb/issues/37" rel="noreferrer" target="_blank">https://github.com/peeringdb/django-peeringdb/issues/37</a><br>
  "errors with django 3 so limit to django 2 or fix them #37"<br>
<br>
Bill, if your issue is unique after review of:<br>
<br>
  <a href="https://github.com/peeringdb/django-peeringdb/issues" rel="noreferrer" target="_blank">https://github.com/peeringdb/django-peeringdb/issues</a><br>
<br>
consider a new issue with details.  The django 3 issue manifests as:<br>
<br>
  - django.core.exceptions.SynchronousOnlyOperation: You cannot call this <br>
    from an async context - use a thread or sync_to_async.<br>
<br>
Thanks,<br>
Chris<br>
<br>
On Tue, 11 Feb 2020, Milton Ngan wrote:<br>
> The only issue I had was with django-peeringdb needing to use Django < <br>
> 3.x. A whole bunch of things don’t work with the latest version of the <br>
> framework. I had to put this requirement into my python projects that <br>
> used the django-peeringdb module and PY3.<br>
> <br>
> Django<=2.2.9<br>
> <br>
> <br>
> On Feb 11, 2020, at 8:38 AM, William Marantz <<a href="mailto:wmarantz@salesforce.com" target="_blank">wmarantz@salesforce.com</a>> wrote:<br>
> > Hi All,<br>
> > <br>
> > Has anyone seen issues with the peeringDB python module when <br>
> > converting to Python 3.x? I was unable to get the module working <br>
> > during my python 3 conversion as it seemed to require a localDB and no <br>
> > longer performed remote calls properly.  The documents seem a bit <br>
> > light.<br>
> > <br>
> > This is not a current issue for me, I just wanted to bring it up in <br>
> > case others were aware of the issue and/or a fix. I rewrote my code to <br>
> > make API calls instead of using the python module and all is working <br>
> > perfectly.<br>
> > <br>
> > Best Regards,<br>
> > <br>
> >   -Bill<br>
> > _______________________________________________<br>
> > Pdb-tech mailing list<br>
> > <a href="mailto:Pdb-tech@lists.peeringdb.com" target="_blank">Pdb-tech@lists.peeringdb.com</a><br>
> > <a href="https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech" rel="noreferrer" target="_blank">https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech</a><br>
> <br>
> _______________________________________________<br>
> Pdb-tech mailing list<br>
> <a href="mailto:Pdb-tech@lists.peeringdb.com" target="_blank">Pdb-tech@lists.peeringdb.com</a><br>
> <a href="https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech" rel="noreferrer" target="_blank">https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>Bill Marantz</b><br>Principal Network Engineer</div><div dir="ltr">Backbone Engineering<br>Mobile: 848-404-4613<div>email: <a href="mailto:ihamilton@salesforce.com" style="color:rgb(17,85,204)" target="_blank">wmarantz@salesforce.com</a><br></div></div></div></div></div></div><br></div></div></div></div></div>