Comments (5)
These are intentionally omitted; if you deploy the project with briefcase, these values are obtained from pyproject.toml and put into the package metadata (the .dist-info file) at time of installation. They only need to be in the constructor if you need to accomodate python -m
execution - which isn't an issue for Podium, as it's a standalone app.
I'm intrigued that you're getting this on a briefcase dev
run though. I don't get that in my own testing, on either Linux or macOS. The usual cause will be that the .dist-info
file hasn't been output, which happens as part of the installation of app source. Has the .dist-info
content been created in your install?
The other interesting point - is the toga 0.3.0.dev35
accurate? If you've done briefcase dev
, it should be pinning dependencies to dev21. That won't matter on GTK, but it will on macOS.
from podium.
Brand new virtualenv, removed build and linux folders:
(venv) $ pip install --pre beeware
(venv) $ briefcase dev
Traceback (most recent call last):
File "/home/dan/.pyenv/versions/3.10.5/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/dan/.pyenv/versions/3.10.5/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/dan/Projects/podium/src/podium/__main__.py", line 1, in <module>
from podium.app import main
File "/home/dan/Projects/podium/src/podium/app.py", line 1, in <module>
import toga
ModuleNotFoundError: No module named 'toga'
Unable to start application 'podium'
from podium.
This second error seems to confirm what I suspected. The issue isn't the clean virtualenv; it's the existence (or not) of the src/podium.dist-info
folder.
During an initial dev pass, briefcase will look for the existence of a .dist-info
folder to determine whether briefcase has been "installed", which is the trigger for whether dependencies need to be installed. However, if you have used an older virtual environment to run briefcase (or there's any other reason that a .dist-info
file exists) then the briefcase will infer that dependencies have been installed, and then crash because they haven't been installed in this virtual environment.
The good news - run briefcase dev -d
, and it will force the install of the dependencies. That will fix the ModuleNotFoundError
from the second error.
If my theory is correct, your .dist-info
folder is corrupted somehow (not sure how); so once you've run briefcase dev -d
, Briefcase will re-write the .dist-info
folder, which should ensure the necessary metadata is available (It would be good to preserve a copy of the existing .dist-info
file first so we can work out what corruption has occurred, and try and work out what has happened).
from podium.
Hi @freakboy3742, unfortunately, that didn't work.
(.venv) ⋊> ~/P/podium on main ◦ briefcase dev -d 19:58:55
[podium] Installing dependencies...
Collecting toga-gtk==0.3.0.dev21
Using cached toga_gtk-0.3.0.dev21-py3-none-any.whl (33 kB)
Collecting pygobject>=3.14.0
Using cached PyGObject-3.42.1-cp310-cp310-linux_x86_64.whl
Collecting toga-core==0.3.0.dev21
Using cached toga_core-0.3.0.dev21-py3-none-any.whl (482 kB)
Collecting gbulb>=0.5.3
Using cached gbulb-0.6.3-py2.py3-none-any.whl (17 kB)
Collecting pycairo>=1.17.0
Using cached pycairo-1.21.0-cp310-cp310-linux_x86_64.whl
Collecting travertino>=0.1.3
Using cached travertino-0.1.3-py3-none-any.whl (15 kB)
Installing collected packages: travertino, pycairo, toga-core, pygobject, gbulb,
toga-gtk
Successfully installed gbulb-0.6.3 pycairo-1.21.0 pygobject-3.42.1
toga-core-0.3.0.dev21 toga-gtk-0.3.0.dev21 travertino-0.1.3
Installing dev dependencies... done
[podium] Starting in dev mode...
Traceback (most recent call last):
File "/home/dan/.pyenv/versions/3.10.5/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/dan/.pyenv/versions/3.10.5/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/dan/Projects/podium/src/podium/__main__.py", line 7, in <module>
start()
File "/home/dan/Projects/podium/src/podium/__main__.py", line 4, in start
main().main_loop()
File "/home/dan/Projects/podium/src/podium/app.py", line 125, in main
return Podium()
File "/home/dan/Projects/podium/src/podium/app.py", line 8, in __init__
super().__init__(
File "/home/dan/Projects/podium/.venv/lib/python3.10/site-packages/toga/app.py", line 486, in __init__
super().__init__(
File "/home/dan/Projects/podium/.venv/lib/python3.10/site-packages/toga/app.py", line 164, in __init__
raise RuntimeError('Toga application must have a formal name')
RuntimeError: Toga application must have a formal name
Unable to start application 'podium'
Log saved to /home/dan/Projects/podium/briefcase.2022_07_11-19_59_13.dev.log
The good news is that removing src/podium.dist-info
and src/podum.egg-info
did correct things. Although pressing cancel on the file dialog results in another traceback:
[podium] Starting in dev mode...
Traceback (most recent call last):
File "/home/dan/Projects/podium/.venv/lib/python3.10/site-packages/toga_gtk/app.py", line 230, in gtk_startup
file_name = os.path.abspath(sys.argv[1])
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/dan/Projects/podium/.venv/lib/python3.10/site-packages/toga_gtk/app.py", line 236, in gtk_startup
file_name = m.select_folder_dialog(self.interface.name, None, False)[0]
File "/home/dan/Projects/podium/.venv/lib/python3.10/site-packages/toga/window.py", line 296, in select_folder_dialog
return self._impl.select_folder_dialog(title, initial_directory, multiselect)
File "/home/dan/Projects/podium/.venv/lib/python3.10/site-packages/toga_gtk/window.py", line 176, in select_folder_dialog
return dialogs.select_folder(self.interface, title, multiselect)
File "/home/dan/Projects/podium/.venv/lib/python3.10/site-packages/toga_gtk/dialogs.py", line 152, in select_folder
raise ValueError("No folder provided in the select folder dialog")
ValueError: No folder provided in the select folder dialog
I'll go ahead and close this issue, since it does look like my dist-info folder was the problem. Thanks for your help!
from podium.
Hrm... the existence of .egg-info suggests something wonky has gone on - that definitely shouldn't exist, and it could easily be causing the problem you've described, as it would be an alternate source of metadata (that won't contain the Briefcase metadata), and will likely be taking precedence over dist-info. It would be interesting to work out where that file came from; but in the meantime, it looks like you're unstuck. The exception on cancel is definitely a bug, though.
from podium.
Related Issues (20)
- Cannot install on ubuntu HOT 3
- I am unable to run podium. HOT 3
- Notes zoom buttons don't work
- Cannot open using `open <deck>.podium` HOT 2
- Missing requirements file? HOT 2
- The arrows seem to be not working when capslock is on HOT 3
- Running podium on Linux platform HOT 6
- Regression: default stylesheet not loading
- Readme should tell the user to install briefcase before telling them to use it HOT 2
- External href links are death traps
- Inlining of defaults.css in templated HTML breaks relative URLs
- Play slideshow sends wrong screen to extended display HOT 3
- Store preferred screen orientation as a user setting
- Store user watermark text as a user preference HOT 2
- Is there a way to open slides in the browser? HOT 5
- Package Error: Unable to clone application template because of wrong path HOT 1
- Document markdown format supported HOT 1
- Crashes when launched on macOS Monterey [12.3] HOT 1
- v0.2 binary release won't start on M2 Macbook Pro HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podium.