Giter VIP home page Giter VIP logo

Comments (12)

MaksymSofer avatar MaksymSofer commented on May 26, 2024 1

amazing!!
issue resolved

from birdseye.

alexmojaki avatar alexmojaki commented on May 26, 2024

Can you share more details?

from birdseye.

MaksymSofer avatar MaksymSofer commented on May 26, 2024

Running in WSL (Ubuntu 22.04)
real location of file:
/home/maks/PycharmProjects/backoffice/to_dockerBB/Datasource.py
link in birdseye:

http://127.0.0.1:7777/file//home/maks/PycharmProjects/backoffice/to_dockerBB/Datasource.py/__function__/Datasource.get_users

result:
404 (not found)

changing link manually to http://127.0.0.1:7777/file/Datasource.py/__function__/Datasource.get_users
result

  File "/home/maks/PycharmProjects/backoffice/.venv/lib/python3.10/site-packages/birdseye/db.py", line 241, in wrapper
    return func(session, *args, **kwargs)
  File "/home/maks/PycharmProjects/backoffice/.venv/lib/python3.10/site-packages/birdseye/server.py", line 124, in func_view
    func = session.query(Function).filter_by(file=path, name=func_name)[0]
  File "/home/maks/PycharmProjects/backoffice/.venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2551, in __getitem__
    return orm_util._getitem(
  File "/home/maks/PycharmProjects/backoffice/.venv/lib/python3.10/site-packages/sqlalchemy/orm/util.py", line 2195, in _getitem
    return list(iterable_query[item : item + 1])[0]
IndexError: list index out of range

trying http://127.0.0.1:7777/file/Datasource.py
result:
image

from birdseye.

MaksymSofer avatar MaksymSofer commented on May 26, 2024

the data in .birdseye.db present and viewable

from birdseye.

alexmojaki avatar alexmojaki commented on May 26, 2024

I don't think using just Datasource.py as the file path is helpful. The last link isn't actually working in any sense, you could put any filename there and it would show a similar page. The question is why the first link is giving 404.

I'm not familiar with WSL. Are you running both the original Python program and the birdseye server within Ubuntu? What happens if you run one or both directly in Windows?

What do you see in .birdseye.db?

from birdseye.

MaksymSofer avatar MaksymSofer commented on May 26, 2024

both running inside of WSL.

sqlite> .tables
call      function  keyvalue

in function table things like this:

2|/home/maks/PycharmProjects/backoffice/to_dockerBB/Datasource.py|Datasource.__init__|function|

maybe this important - i`m running in poetry venv

tried running birdseye server on windows copying .birdseye.db to user directory - still the same behavior (non working links)
db it self viewable and looks correct (cant upload it as too much sensitive data inside)

from birdseye.

alexmojaki avatar alexmojaki commented on May 26, 2024

I assume there's a row in the DB that says /home/maks/PycharmProjects/backoffice/to_dockerBB/Datasource.py|Datasource.get_users|function|?

Can you edit this file and print(path, func_name) before that line?

  File "/home/maks/PycharmProjects/backoffice/.venv/lib/python3.10/site-packages/birdseye/server.py", line 124, in func_view
    func = session.query(Function).filter_by(file=path, name=func_name)[0]

from birdseye.

MaksymSofer avatar MaksymSofer commented on May 26, 2024

here content of function table
image

added print, but nothing in output
I tried to move print out of if\else

@db.provide_session
def func_view(session, path, func_name):
    path = fix_abs_path(path)
    query = get_calls(session, path, func_name, 200)
    print(path, func_name)
    if query:
        func = query[0]
        calls = [withattrs(Call(), **row._asdict()) for row in query]
    else:
        func = session.query(Function).filter_by(file=path, name=func_name)[0]
        calls = None

    return render_template('function.html',
                           func=func,
                           short_path=basename(path),
                           calls=calls)

but still nothing in output

from birdseye.

alexmojaki avatar alexmojaki commented on May 26, 2024

What if you visit http://127.0.0.1:7777/file/home/maks/PycharmProjects/backoffice/to_dockerBB/Datasource.py/__function__/Datasource.get_users ?

from birdseye.

MaksymSofer avatar MaksymSofer commented on May 26, 2024
INFO:werkzeug:127.0.0.1 - - [16/Oct/2023 22:57:48] "GET /file//home/maks/PycharmProjects/backoffice/to_dockerBB/Datasource.py/__function__/Datasource.get_users HTTP/1.1" 404 -
INFO:werkzeug:127.0.0.1 - - [16/Oct/2023 22:57:52] "GET /file//home/maks/PycharmProjects/backoffice/to_dockerBB/Datasource.py/__function__/Datasource.__init__ HTTP/1.1" 404 -
INFO:werkzeug:127.0.0.1 - - [16/Oct/2023 23:03:22] "GET /file/home/maks/PycharmProjects/backoffice/to_dockerBB/Datasource.py/__function__/Datasource.get_users HTTP/1.1" 404 -

from birdseye.

alexmojaki avatar alexmojaki commented on May 26, 2024

OK, I was able to reproduce locally once I did a fresh install. There was an update to werkzeug's routing that broke things. Will release a fix soon.

from birdseye.

alexmojaki avatar alexmojaki commented on May 26, 2024

released 0.9.5, give it a go

from birdseye.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.