Comments (5)
This appears to be fixed, so I'm going to close this. Will reopen if another card ends up crashing in the future!
from proxyshop.
I ran into this issue with Firkraag, Cunning Instigator as well. Currently unable to test your most recent fix since I'm running into a ModuleNotFoundError: No module named 'get_image_size'
from proxyshop.
Ok, so after resolving my dependency issue by running pip install -r requirements.txt
I was able to get Firkraag, Cunning Instigator to render (using Extended template)! However, I immediately ran into the hanging issue again during the text box resizing when trying to render Nalia de'Arnise (using Expedition template) during the "Formatting text..." stage.
Error was as follows:
File "D:\Users\davidianstyle\Code\MTG-Proxyshop\proxyshop\templates.py", line 241, in execute
this_layer.execute()
File "D:\Users\davidianstyle\Code\MTG-Proxyshop\proxyshop\text_layers.py", line 372, in execute
super().execute()
File "D:\Users\davidianstyle\Code\MTG-Proxyshop\proxyshop\text_layers.py", line 287, in execute
ft.format_text(self.contents + "\r" + self.flavor_text, self.italic_text, self.flavor_index, self.centered)
File "D:\Users\davidianstyle\Code\MTG-Proxyshop\proxyshop\format_text.py", line 495, in format_text
app.executeAction(idsetd, desc119, NO_DIALOG)
File "D:\Users\davidianstyle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\photoshop\api\application.py", line
355, in executeAction
return self.app.executeAction(event_id, descriptor, display_dialogs)
File "D:\Users\davidianstyle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\client\lazybind.py", line 182, in caller
return self._comobj._invoke(descr.memid, descr.invkind, 0, *args)
File "D:\Users\davidianstyle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\automation.py", line 745, in _invoke
self.__com_Invoke(memid, riid_null, lcid, invkind,```
from proxyshop.
I keep forgetting to make commits but I finally designed a robust fix for the long text entry crash a couple days back, just pushed changes so pick them up and let me know if that does it for ya! I tested Nalia de'Arnise on Expedition template and working on my end.
Here's an outline of how the fix works:
- if card has over 280 characters, insert the contents and the flavor text, then:
- scale_text_to_fit_height() -- New function similar to scale to fit reference, feed it the height of the reference increased by 1%
- everything else in the text_layers class runs as normal afterwards (insert text, format it, scale it, add divider, etc)
I realized the crash happens during format_text()
, not when the text is initially inserted. It must have something to do with working with the text using action descriptors when the text doesn't fit the textbox. So, we do a pre-format resize of the text till its low enough to almost fit.
The reason I chose to use the height of the reference + 1% is because this scaling is being done before the text is formatted. The reason we scale after formatting is to account for any size loss caused by formatting the symbols and such. I wanted to leave just enough headroom to keep outside the bounds and the traditional scale_text_to_fit_reference()
will make the last reduction if needed.
from proxyshop.
Awesome, that worked! Results uploaded to my drive.
from proxyshop.
Related Issues (20)
- [FEATURE] - Allow hiding set symbol and/or collector's information HOT 2
- [BUG] - Cards with a colon in its name aren't outputted properly HOT 3
- [BUG] - Banned cards due to non-appropiate imagery aren't found by new scryfall search method HOT 2
- [BUG] - "Lieutenant" ability not being italicized due to regex HOT 1
- [BUG] - Kivy not (yet) working with Python 3.11 HOT 3
- [BUG] - New scryfall search includes art cards on the search results and those aren't valid to render HOT 4
- [BUG] - Discord invitation link on README.MD expired HOT 1
- [BUG] - Hybrid mana creatures throw error while enabling layers HOT 2
- [BUG] - Italics Issue with some 40K cards HOT 1
- [BUG] - Hybrid cases like Asmoranomardicadaistinaculdacar HOT 1
- [BUG] - [RuntimeError] Unable to install project dependencies (kivy): HOT 3
- Windows 11 says the executable is a virus. HOT 2
- [BUG] - Unable to insert collector info HOT 4
- [BUG] - Update failure - The OAuth client was deleted. HOT 1
- extended art planeswalker template won't render HOT 2
- [FEAT] - Add support for loyalty +/- ability text HOT 1
- [FEAT] - Proxyglyph font is missing the 1,000,000 mana symbol HOT 3
- [BUG] - Incorrect font sizing on Normal Token Oracle Text. HOT 3
- [BUG] - Saga templating with reminder text off
- [FEAT] - Allow folder mapping for SVG symbols as a fallback for manifest mapping 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 proxyshop.