Virtualia Posted June 28, 2023 Share Posted June 28, 2023 Hello, so I have this code: from prestapyt import PrestaShopWebServiceDict url=xxxxxxx key =xxxxxx prestashop = PrestaShopWebServiceDict(url, key) data = prestashop.get('bap_image') and I would like to get the information of my bap_image table but I got this error telling me that this table doesn't exist:prestapyt.prestapyt.PrestaShopWebServiceError: 'Resource of type "bap_image" does not exists. Did you mean: "images"? The full list is: "addresses", "attachments", "carriers", "cart_rules", "carts", "categories", "combinations", "configurations", "contacts", "content_management_system", "countries", "currencies", "customer_messages", "customer_threads", "customers", "customizations", "deliveries", "employees", "groups", "guests", "image_types", "images", "languages", "manufacturers", "messages", "order_carriers", "order_cart_rules", "order_details", "order_histories", "order_invoices", "order_payments", "order_slip", "order_states", "orders", "price_ranges", "product_customization_fields", "product_feature_values", "product_features", "product_option_values", "product_options", "product_suppliers", "products", "search", "shop_groups", "shop_urls", "shops", "specific_price_rules", "specific_prices", "states", "stock_availables", "stock_movement_reasons", "stock_movements", "stocks", "stores", "suppliers", "supply_order_details", "supply_order_histories", "supply_order_receipt_histories", "supply_order_states", "supply_orders", "tags", "tax_rule_groups", "tax_rules", "taxes", "translated_configurations", "warehouse_product_locations", "warehouses", "weight_ranges", "zones"' but when I look directly in prestashop this table does exist Link to comment Share on other sites More sharing options...
AddWeb Solution Posted August 4, 2023 Share Posted August 4, 2023 Hi, The error message you are encountering indicates that there is no resource (table) named "bap_image" in the PrestaShop web service API. Instead, the available resource for managing images in PrestaShop is called "images." To get the information from the "images" table, you should modify your code accordingly: from prestapyt import PrestaShopWebServiceDict url = 'xxxxxxx' key = 'xxxxxx' prestashop = PrestaShopWebServiceDict(url, key) data = prestashop.get('images') This should work without any error and fetch data from the "images" resource (table) in PrestaShop. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now