Dismiss Notice
How Does This Work?

You create a free account and set a Gmail filter to forward your Ingress email damage reports.

The damage reports are processed in realtime into the Outgress analytics and alerting engine.

That's the short version.

Is This Allowed?

We believe so, but you decide.

But My Secret Data!

No one on the opposing faction cares who on their team is attacking you. Do you care who on your team is attacking opposing portals?

Max fielding plan

Discussion in 'Bugs' started by Qa_guy, Jun 29, 2019.

  1. Qa_guy

    Qa_guy New Member Resistance L16

    Does Max fielding plan work for you?

    It worked but stopped.

    It shows message about background and nothing else after that.
     
  2. digitalpoint

    digitalpoint Administrator Staff Member Illuminator Enlightened L15

    Ya, there is an issue with the underlying library (which hasn’t been updated in years) with the new version of Python. Not a language I’m very good in, so haven’t really had to time to muck with it and see if I can make it work right with the new version. It’s a known issue, but no eta on a fix unless you know someone who’s better with Python than I am who would want to help. :)
     
  3. Qa_guy

    Qa_guy New Member Resistance L16

    Hi, Thank you for timely reply! Could I take a look into it? I cannot guarantee I can fix it but I like Python. :)
     
  4. Qa_guy

    Qa_guy New Member Resistance L16

    I meam can I help?
     
  5. digitalpoint

    digitalpoint Administrator Staff Member Illuminator Enlightened L15

    I’ll post what I have tomorrow evening. I’m out of town at the moment, so don’t have access to a computer until I get back tomorrow.
     
  6. Qa_guy

    Qa_guy New Member Resistance L16

    Thanks!
     
  7. digitalpoint

    digitalpoint Administrator Staff Member Illuminator Enlightened L15

    Okay, so this is what the underlying utility is: https://github.com/jpeterbaker/maxfield

    Nothing changed on our end with the code, but we did upgrade the operating system on our servers, so probably a newer version of python is on it now (which is Python 2.7.14). I believe the old server operating system had Python 2.7.9, so it's not like it was a major difference.

    The error we are getting kicked back right now is:

    Code:
    Maxfield Copyright (C) 2015 Jonathan Baker: babamots@gmail.com
    Traceback (most recent call last):
      File "maxfield.py", line 251, in <module>
        sys.exit(main())
      File "maxfield.py", line 151, in main
        xy   = geometry.gnomonicProj(locs,xyz)
      File "lib/geometry.py", line 166, in gnomonicProj
        if ptsxyz == None:
    ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
     
  8. Qa_guy

    Qa_guy New Member Resistance L16

    Ok, let me check it.
     
  9. digitalpoint

    digitalpoint Administrator Staff Member Illuminator Enlightened L15

    I spent a little time on it this evening... looks like it's mostly the server being upgraded and the Networkx Python package going from 1.x to 2.x. I got it about 90% working... required doing the following:
    • converting G.edges_iter() method calls to G.edges()
    • converting G.edge attribute to G.adj
    • converting G.add_edge() method to not use attr_dict parameter, and use keyword arguments instead
    https://networkx.github.io/documentation/networkx-2.2/release/migration_guide_from_1.x_to_2.0.html
    https://networkx.github.io/documentation/networkx-2.2/release/release_2.0.html

    I got it kind of working, but there's an issue reading back the attributes being set when using add_edge() for some reason. I don't really know Python well enough to be mucking with it. Basically it needs to be updated for Networkx 2.x it looks like.
     
  10. digitalpoint

    digitalpoint Administrator Staff Member Illuminator Enlightened L15

    So it's a little better... not sure it entirely works 100%, but at least it generates something now. I've also solidified the reason why I hate Python. :)
     
  11. Qa_guy

    Qa_guy New Member Resistance L16

    Hi,

    My findings:

    1. I cloned repo on my machine
    2. It has Python 2.7.15
    3. I changed requirements.txt like this:
    distribute==0.7.3
    matplotlib==2.2.4
    networkx==1.11.0
    numpy==1.8.1
    docopt==0.6.1
    4. run next command on terminal
    sudo pip install -r requirements.txt
    5. I ran example command and it created files for me
    python maxfield.py -n 4 EXAMPLE.csv output/ output.pkl

    Could you try?
     
  12. Qa_guy

    Qa_guy New Member Resistance L16

    I used bare metal Ubuntu 18.04 with latest updates (just in case)
     
  13. Qa_guy

    Qa_guy New Member Resistance L16

    Of course we will need to update maxfield for Python 3.X but for now downgrade solution could work.
     
  14. digitalpoint

    digitalpoint Administrator Staff Member Illuminator Enlightened L15

    Ya, I think it's working(ish) now. Basically went in there and got it working with networkx 2.x. The only other thing Python is used for on the server is for some management tools for Gluster. And honestly, don't really want to mess with trying to run old versions of stuff to try and get maxfield working. At this point, Gluster *not* breaking is far more important for the cluster of servers. :)

    This is what the servers are currently running (which I don't really want to mess with):

    python-2.7.14-lp151.9.1.x86_64
    python2-numpy-1.14.0-lp151.4.14.x86_64
    python2-networkx-2.0-lp151.2.2.noarch
    python2-matplotlib-2.0.2-lp151.3.6.x86_64

    Python 3 is also installed (but not used for maxfields)

    python3-3.6.5-lp151.5.1.x86_64

    Servers are running OpenSUSE Leap 15.1
     
  15. Qa_guy

    Qa_guy New Member Resistance L16

    Oh, I see. I'll try to do on Monday with your setup.
     
  16. Qa_guy

    Qa_guy New Member Resistance L16

    Happy 4th July! And happy hunting :)
     
  17. digitalpoint

    digitalpoint Administrator Staff Member Illuminator Enlightened L15

    Is maxfield not working for you here? It seems to work for me after I went through their crappy code and fixed some things for Networkx 2. :)
     
  18. Qa_guy

    Qa_guy New Member Resistance L16

    Nice job!
    Thank you!
    It works!